ERC-20
Overview
Max Total Supply
515,673 BHDAO
Holders
70
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
10,000 BHDAOValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
BlockHubGovernanceToken
Compiler Version
v0.7.6+commit.7338295f
Optimization Enabled:
Yes with 1 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.7.6; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20Snapshot.sol"; // ____ _ ____ _____ _ ___ _ _ _ ____ _____ ____ // | _ \| | / __ \ / ____| |/ / | | | | | | _ \ | __ \ /\ / __ \ // | |_) | | | | | | | | ' /| |__| | | | | |_) | | | | | / \ | | | | // | _ <| | | | | | | | < | __ | | | | _ < | | | |/ /\ \| | | | // | |_) | |___| |__| | |____| . \| | | | |__| | |_) | | |__| / ____ \ |__| | // |____/|______\____/ \_____|_|\_\_| |_|\____/|____/ |_____/_/ \_\____/ /// @title BlockHub DAO governance token /// @author BlockHub DAO contract BlockHubGovernanceToken is ERC20Snapshot, Ownable { address public multisigAddress; uint256 public currentSnapshotId; event MultisigAddressUpdated(address indexed newMultisigAddress); /// @dev Verifies that the address that calls the function is either the super-admin or the multisig modifier onlyAllowed() { require( owner() == msg.sender || multisigAddress == msg.sender, "Auth: Caller is not allowed" ); _; } /// @dev Verifies that the address in param is valid /// @param add - an address modifier validAddress(address add) { require(add != address(0), "Valid: Cannot use zero address"); _; } constructor( string memory tokenName, string memory tokenSymbol, uint8 tokenDecimals ) ERC20(tokenName, tokenSymbol) { _setupDecimals(tokenDecimals); } /// @dev Modifies the address used for the multisig /// @param newAddress - The address of the multisig /// @return bool function setMultisigAddress(address newAddress) external onlyAllowed validAddress(newAddress) returns (bool) { multisigAddress = newAddress; emit MultisigAddressUpdated(newAddress); return true; } /// @dev Mints new governance tokens from either the super-admin or the multisig /// @param recipient_ - address of the minting recipient /// @param amount_ - amount of tokens to mint /// @return bool function mintNewVotingTokens(address recipient_, uint256 amount_) external validAddress(recipient_) onlyAllowed returns (bool) { _mint(recipient_, amount_); } /// @dev Allows a super-admin or the multisig to initiate a snapshot function snapshot() external onlyAllowed { currentSnapshotId = _snapshot(); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../../math/SafeMath.sol"; import "../../utils/Arrays.sol"; import "../../utils/Counters.sol"; import "./ERC20.sol"; /** * @dev This contract extends an ERC20 token with a snapshot mechanism. When a snapshot is created, the balances and * total supply at the time are recorded for later access. * * This can be used to safely create mechanisms based on token balances such as trustless dividends or weighted voting. * In naive implementations it's possible to perform a "double spend" attack by reusing the same balance from different * accounts. By using snapshots to calculate dividends or voting power, those attacks no longer apply. It can also be * used to create an efficient ERC20 forking mechanism. * * Snapshots are created by the internal {_snapshot} function, which will emit the {Snapshot} event and return a * snapshot id. To get the total supply at the time of a snapshot, call the function {totalSupplyAt} with the snapshot * id. To get the balance of an account at the time of a snapshot, call the {balanceOfAt} function with the snapshot id * and the account address. * * ==== Gas Costs * * Snapshots are efficient. Snapshot creation is _O(1)_. Retrieval of balances or total supply from a snapshot is _O(log * n)_ in the number of snapshots that have been created, although _n_ for a specific account will generally be much * smaller since identical balances in subsequent snapshots are stored as a single entry. * * There is a constant overhead for normal ERC20 transfers due to the additional snapshot bookkeeping. This overhead is * only significant for the first transfer that immediately follows a snapshot for a particular account. Subsequent * transfers will have normal cost until the next snapshot, and so on. */ abstract contract ERC20Snapshot is ERC20 { // Inspired by Jordi Baylina's MiniMeToken to record historical balances: // https://github.com/Giveth/minimd/blob/ea04d950eea153a04c51fa510b068b9dded390cb/contracts/MiniMeToken.sol using SafeMath for uint256; using Arrays for uint256[]; using Counters for Counters.Counter; // Snapshotted values have arrays of ids and the value corresponding to that id. These could be an array of a // Snapshot struct, but that would impede usage of functions that work on an array. struct Snapshots { uint256[] ids; uint256[] values; } mapping (address => Snapshots) private _accountBalanceSnapshots; Snapshots private _totalSupplySnapshots; // Snapshot ids increase monotonically, with the first value being 1. An id of 0 is invalid. Counters.Counter private _currentSnapshotId; /** * @dev Emitted by {_snapshot} when a snapshot identified by `id` is created. */ event Snapshot(uint256 id); /** * @dev Creates a new snapshot and returns its snapshot id. * * Emits a {Snapshot} event that contains the same id. * * {_snapshot} is `internal` and you have to decide how to expose it externally. Its usage may be restricted to a * set of accounts, for example using {AccessControl}, or it may be open to the public. * * [WARNING] * ==== * While an open way of calling {_snapshot} is required for certain trust minimization mechanisms such as forking, * you must consider that it can potentially be used by attackers in two ways. * * First, it can be used to increase the cost of retrieval of values from snapshots, although it will grow * logarithmically thus rendering this attack ineffective in the long term. Second, it can be used to target * specific accounts and increase the cost of ERC20 transfers for them, in the ways specified in the Gas Costs * section above. * * We haven't measured the actual numbers; if this is something you're interested in please reach out to us. * ==== */ function _snapshot() internal virtual returns (uint256) { _currentSnapshotId.increment(); uint256 currentId = _currentSnapshotId.current(); emit Snapshot(currentId); return currentId; } /** * @dev Retrieves the balance of `account` at the time `snapshotId` was created. */ function balanceOfAt(address account, uint256 snapshotId) public view virtual returns (uint256) { (bool snapshotted, uint256 value) = _valueAt(snapshotId, _accountBalanceSnapshots[account]); return snapshotted ? value : balanceOf(account); } /** * @dev Retrieves the total supply at the time `snapshotId` was created. */ function totalSupplyAt(uint256 snapshotId) public view virtual returns(uint256) { (bool snapshotted, uint256 value) = _valueAt(snapshotId, _totalSupplySnapshots); return snapshotted ? value : totalSupply(); } // Update balance and/or total supply snapshots before the values are modified. This is implemented // in the _beforeTokenTransfer hook, which is executed for _mint, _burn, and _transfer operations. function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override { super._beforeTokenTransfer(from, to, amount); if (from == address(0)) { // mint _updateAccountSnapshot(to); _updateTotalSupplySnapshot(); } else if (to == address(0)) { // burn _updateAccountSnapshot(from); _updateTotalSupplySnapshot(); } else { // transfer _updateAccountSnapshot(from); _updateAccountSnapshot(to); } } function _valueAt(uint256 snapshotId, Snapshots storage snapshots) private view returns (bool, uint256) { require(snapshotId > 0, "ERC20Snapshot: id is 0"); // solhint-disable-next-line max-line-length require(snapshotId <= _currentSnapshotId.current(), "ERC20Snapshot: nonexistent id"); // When a valid snapshot is queried, there are three possibilities: // a) The queried value was not modified after the snapshot was taken. Therefore, a snapshot entry was never // created for this id, and all stored snapshot ids are smaller than the requested one. The value that corresponds // to this id is the current one. // b) The queried value was modified after the snapshot was taken. Therefore, there will be an entry with the // requested id, and its value is the one to return. // c) More snapshots were created after the requested one, and the queried value was later modified. There will be // no entry for the requested id: the value that corresponds to it is that of the smallest snapshot id that is // larger than the requested one. // // In summary, we need to find an element in an array, returning the index of the smallest value that is larger if // it is not found, unless said value doesn't exist (e.g. when all values are smaller). Arrays.findUpperBound does // exactly this. uint256 index = snapshots.ids.findUpperBound(snapshotId); if (index == snapshots.ids.length) { return (false, 0); } else { return (true, snapshots.values[index]); } } function _updateAccountSnapshot(address account) private { _updateSnapshot(_accountBalanceSnapshots[account], balanceOf(account)); } function _updateTotalSupplySnapshot() private { _updateSnapshot(_totalSupplySnapshots, totalSupply()); } function _updateSnapshot(Snapshots storage snapshots, uint256 currentValue) private { uint256 currentId = _currentSnapshotId.current(); if (_lastSnapshotId(snapshots.ids) < currentId) { snapshots.ids.push(currentId); snapshots.values.push(currentValue); } } function _lastSnapshotId(uint256[] storage ids) private view returns (uint256) { if (ids.length == 0) { return 0; } else { return ids[ids.length - 1]; } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../math/Math.sol"; /** * @dev Collection of functions related to array types. */ library Arrays { /** * @dev Searches a sorted `array` and returns the first index that contains * a value greater or equal to `element`. If no such index exists (i.e. all * values in the array are strictly less than `element`), the array length is * returned. Time complexity O(log n). * * `array` is expected to be sorted in ascending order, and to contain no * repeated elements. */ function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) { if (array.length == 0) { return 0; } uint256 low = 0; uint256 high = array.length; while (low < high) { uint256 mid = Math.average(low, high); // Note that mid will always be strictly less than high (i.e. it will be a valid array index) // because Math.average rounds down (it does integer division with truncation). if (array[mid] > element) { high = mid; } else { low = mid + 1; } } // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound. if (low > 0 && array[low - 1] == element) { return low - 1; } else { return low; } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../math/SafeMath.sol"; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath} * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never * directly accessed. */ library Counters { using SafeMath for uint256; struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { // The {SafeMath} overflow check can be skipped here, see the comment at the top counter._value += 1; } function decrement(Counter storage counter) internal { counter._value = counter._value.sub(1); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../../utils/Context.sol"; import "./IERC20.sol"; import "../../math/SafeMath.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for {name} and {symbol}, initializes {decimals} with * a default value of 18. * * To select a different value for {decimals}, use {_setupDecimals}. * * All three of these values are immutable: they can only be set once during * construction. */ constructor (string memory name_, string memory symbol_) public { _name = name_; _symbol = symbol_; _decimals = 18; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is * called. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual returns (uint8) { return _decimals; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */ function _setupDecimals(uint8 decimals_) internal virtual { _decimals = decimals_; } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow, so we distribute return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
{ "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "optimizer": { "enabled": true, "runs": 1 }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"tokenName","type":"string"},{"internalType":"string","name":"tokenSymbol","type":"string"},{"internalType":"uint8","name":"tokenDecimals","type":"uint8"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newMultisigAddress","type":"address"}],"name":"MultisigAddressUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"}],"name":"Snapshot","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":"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":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"snapshotId","type":"uint256"}],"name":"balanceOfAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentSnapshotId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"mintNewVotingTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"multisigAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAddress","type":"address"}],"name":"setMultisigAddress","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"snapshot","outputs":[],"stateMutability":"nonpayable","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":"uint256","name":"snapshotId","type":"uint256"}],"name":"totalSupplyAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604051620017af380380620017af833981810160405260608110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200010a57600080fd5b9083019060208201858111156200012057600080fd5b82516401000000008111828201881017156200013b57600080fd5b82525081516020918201929091019080838360005b838110156200016a57818101518382015260200162000150565b50505050905090810190601f168015620001985780820380516001836020036101000a031916815260200191505b5060405260209081015185519093508592508491620001bd916003918501906200026b565b508051620001d39060049060208401906200026b565b50506005805460ff19166012179055506000620001ef62000251565b600a80546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350620002488162000255565b50505062000317565b3390565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620002a35760008555620002ee565b82601f10620002be57805160ff1916838001178555620002ee565b82800160010185558215620002ee579182015b82811115620002ee578251825591602001919060010190620002d1565b50620002fc92915062000300565b5090565b5b80821115620002fc576000815560010162000301565b61148880620003276000396000f3fe608060405234801561001057600080fd5b50600436106101075760003560e01c8063055405341461010c57806306fdde0314610146578063095ea7b3146101c357806318160ddd146101ef57806323b872dd14610209578063245efbd51461023f578063313ce5671461026b57806339509351146102895780634ee2cd7e146102b55780635462870d146102e157806370a0823114610305578063715018a61461032b5780638da5cb5b1461033557806395d89b411461033d578063970875ce146103455780639711715a1461034d578063981b24d014610355578063a457c2d714610372578063a9059cbb1461039e578063dd62ed3e146103ca578063f2fde38b146103f8575b600080fd5b6101326004803603602081101561012257600080fd5b50356001600160a01b031661041e565b604080519115158252519081900360200190f35b61014e610521565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610188578181015183820152602001610170565b50505050905090810190601f1680156101b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610132600480360360408110156101d957600080fd5b506001600160a01b0381351690602001356105b7565b6101f76105d5565b60408051918252519081900360200190f35b6101326004803603606081101561021f57600080fd5b506001600160a01b038135811691602081013590911690604001356105db565b6101326004803603604081101561025557600080fd5b506001600160a01b038135169060200135610662565b610273610726565b6040805160ff9092168252519081900360200190f35b6101326004803603604081101561029f57600080fd5b506001600160a01b03813516906020013561072f565b6101f7600480360360408110156102cb57600080fd5b506001600160a01b03813516906020013561077d565b6102e96107c6565b604080516001600160a01b039092168252519081900360200190f35b6101f76004803603602081101561031b57600080fd5b50356001600160a01b03166107d5565b6103336107f4565b005b6102e961088e565b61014e61089d565b6101f76108fe565b610333610904565b6101f76004803603602081101561036b57600080fd5b5035610978565b6101326004803603604081101561038857600080fd5b506001600160a01b0381351690602001356109a8565b610132600480360360408110156103b457600080fd5b506001600160a01b038135169060200135610a10565b6101f7600480360360408110156103e057600080fd5b506001600160a01b0381358116916020013516610a24565b6103336004803603602081101561040e57600080fd5b50356001600160a01b0316610a4f565b60003361042961088e565b6001600160a01b031614806104485750600b546001600160a01b031633145b610487576040805162461bcd60e51b815260206004820152601b60248201526000805160206112af833981519152604482015290519081900360640190fd5b816001600160a01b0381166104d1576040805162461bcd60e51b815260206004820152601e602482015260008051602061140e833981519152604482015290519081900360640190fd5b600b80546001600160a01b0319166001600160a01b0385169081179091556040517fe4a7aa392aa8af59de6ac68803eaa9d30d79f8070671a2561595a72800f6e27190600090a250600192915050565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156105ad5780601f10610582576101008083540402835291602001916105ad565b820191906000526020600020905b81548152906001019060200180831161059057829003601f168201915b5050505050905090565b60006105cb6105c4610b40565b8484610b44565b5060015b92915050565b60025490565b60006105e8848484610c30565b610658846105f4610b40565b6106538560405180606001604052806028815260200161133d602891396001600160a01b038a16600090815260016020526040812090610632610b40565b6001600160a01b031681526020810191909152604001600020549190610d79565b610b44565b5060019392505050565b6000826001600160a01b0381166106ae576040805162461bcd60e51b815260206004820152601e602482015260008051602061140e833981519152604482015290519081900360640190fd5b336106b761088e565b6001600160a01b031614806106d65750600b546001600160a01b031633145b610715576040805162461bcd60e51b815260206004820152601b60248201526000805160206112af833981519152604482015290519081900360640190fd5b61071f8484610e10565b5092915050565b60055460ff1690565b60006105cb61073c610b40565b84610653856001600061074d610b40565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490610eee565b6001600160a01b0382166000908152600660205260408120819081906107a4908590610f4d565b91509150816107bb576107b6856107d5565b6107bd565b805b95945050505050565b600b546001600160a01b031681565b6001600160a01b0381166000908152602081905260409020545b919050565b6107fc610b40565b6001600160a01b031661080d61088e565b6001600160a01b031614610856576040805162461bcd60e51b81526020600482018190526024820152600080516020611365833981519152604482015290519081900360640190fd5b600a546040516000916001600160a01b031690600080516020611385833981519152908390a3600a80546001600160a01b0319169055565b600a546001600160a01b031690565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156105ad5780601f10610582576101008083540402835291602001916105ad565b600c5481565b3361090d61088e565b6001600160a01b0316148061092c5750600b546001600160a01b031633145b61096b576040805162461bcd60e51b815260206004820152601b60248201526000805160206112af833981519152604482015290519081900360640190fd5b61097361104a565b600c55565b6000806000610988846007610f4d565b915091508161099e576109996105d5565b6109a0565b805b949350505050565b60006105cb6109b5610b40565b846106538560405180606001604052806025815260200161142e60259139600160006109df610b40565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190610d79565b60006105cb610a1d610b40565b8484610c30565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b610a57610b40565b6001600160a01b0316610a6861088e565b6001600160a01b031614610ab1576040805162461bcd60e51b81526020600482018190526024820152600080516020611365833981519152604482015290519081900360640190fd5b6001600160a01b038116610af65760405162461bcd60e51b81526004018080602001828103825260268152602001806112cf6026913960400191505060405180910390fd5b600a546040516001600160a01b0380841692169060008051602061138583398151915290600090a3600a80546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b6001600160a01b038316610b895760405162461bcd60e51b81526004018080602001828103825260248152602001806113ea6024913960400191505060405180910390fd5b6001600160a01b038216610bce5760405162461bcd60e51b81526004018080602001828103825260228152602001806112f56022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316610c755760405162461bcd60e51b81526004018080602001828103825260258152602001806113c56025913960400191505060405180910390fd5b6001600160a01b038216610cba5760405162461bcd60e51b815260040180806020018281038252602381526020018061128c6023913960400191505060405180910390fd5b610cc583838361109e565b610d0281604051806060016040528060268152602001611317602691396001600160a01b0386166000908152602081905260409020549190610d79565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610d319082610eee565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716926000805160206113a583398151915292918290030190a3505050565b60008184841115610e085760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610dcd578181015183820152602001610db5565b50505050905090810190601f168015610dfa5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6001600160a01b038216610e6b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b610e776000838361109e565b600254610e849082610eee565b6002556001600160a01b038216600090815260208190526040902054610eaa9082610eee565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391926000805160206113a58339815191529281900390910190a35050565b600082820183811015610f46576040805162461bcd60e51b815260206004820152601b60248201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b604482015290519081900360640190fd5b9392505050565b60008060008411610f9e576040805162461bcd60e51b815260206004820152601660248201527504552433230536e617073686f743a20696420697320360541b604482015290519081900360640190fd5b610fa860096110fb565b841115610ffc576040805162461bcd60e51b815260206004820152601d60248201527f4552433230536e617073686f743a206e6f6e6578697374656e74206964000000604482015290519081900360640190fd5b600061100884866110ff565b8454909150811415611021576000809250925050611043565b600184600101828154811061103257fe5b906000526020600020015492509250505b9250929050565b600061105660096111a0565b600061106260096110fb565b6040805182815290519192507f8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb67919081900360200190a1905090565b6110a98383836110f6565b6001600160a01b0383166110cd576110c0826111a9565b6110c86111d6565b6110f6565b6001600160a01b0382166110e4576110c0836111a9565b6110ed836111a9565b6110f6826111a9565b505050565b5490565b8154600090611110575060006105cf565b82546000905b8082101561115f57600061112a83836111e5565b90508486828154811061113957fe5b9060005260206000200154111561115257809150611159565b8060010192505b50611116565b60008211801561118757508385600184038154811061117a57fe5b9060005260206000200154145b1561119857506000190190506105cf565b5090506105cf565b80546001019055565b6001600160a01b03811660009081526006602052604090206111d3906111ce836107d5565b61120a565b50565b6111e360076111ce6105d5565b565b600060028083066002850601816111f857fe5b04600283046002850401019392505050565b600061121660096110fb565b90508061122284611256565b10156110f6578254600180820185556000858152602080822090930193909355938401805494850181558252902090910155565b8054600090611267575060006107ef565b81548290600019810190811061127957fe5b906000526020600020015490506107ef56fe45524332303a207472616e7366657220746f20746865207a65726f2061646472657373417574683a2043616c6c6572206973206e6f7420616c6c6f77656400000000004f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65728be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef45524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737356616c69643a2043616e6e6f7420757365207a65726f2061646472657373000045524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220cc5ba14dcae6ba5b56b98faf5d3d25480689a6c7aaa6a86d5526e62531ca456164736f6c63430007060033000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000c426c6f636b4875622044414f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005424844414f000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101075760003560e01c8063055405341461010c57806306fdde0314610146578063095ea7b3146101c357806318160ddd146101ef57806323b872dd14610209578063245efbd51461023f578063313ce5671461026b57806339509351146102895780634ee2cd7e146102b55780635462870d146102e157806370a0823114610305578063715018a61461032b5780638da5cb5b1461033557806395d89b411461033d578063970875ce146103455780639711715a1461034d578063981b24d014610355578063a457c2d714610372578063a9059cbb1461039e578063dd62ed3e146103ca578063f2fde38b146103f8575b600080fd5b6101326004803603602081101561012257600080fd5b50356001600160a01b031661041e565b604080519115158252519081900360200190f35b61014e610521565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610188578181015183820152602001610170565b50505050905090810190601f1680156101b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610132600480360360408110156101d957600080fd5b506001600160a01b0381351690602001356105b7565b6101f76105d5565b60408051918252519081900360200190f35b6101326004803603606081101561021f57600080fd5b506001600160a01b038135811691602081013590911690604001356105db565b6101326004803603604081101561025557600080fd5b506001600160a01b038135169060200135610662565b610273610726565b6040805160ff9092168252519081900360200190f35b6101326004803603604081101561029f57600080fd5b506001600160a01b03813516906020013561072f565b6101f7600480360360408110156102cb57600080fd5b506001600160a01b03813516906020013561077d565b6102e96107c6565b604080516001600160a01b039092168252519081900360200190f35b6101f76004803603602081101561031b57600080fd5b50356001600160a01b03166107d5565b6103336107f4565b005b6102e961088e565b61014e61089d565b6101f76108fe565b610333610904565b6101f76004803603602081101561036b57600080fd5b5035610978565b6101326004803603604081101561038857600080fd5b506001600160a01b0381351690602001356109a8565b610132600480360360408110156103b457600080fd5b506001600160a01b038135169060200135610a10565b6101f7600480360360408110156103e057600080fd5b506001600160a01b0381358116916020013516610a24565b6103336004803603602081101561040e57600080fd5b50356001600160a01b0316610a4f565b60003361042961088e565b6001600160a01b031614806104485750600b546001600160a01b031633145b610487576040805162461bcd60e51b815260206004820152601b60248201526000805160206112af833981519152604482015290519081900360640190fd5b816001600160a01b0381166104d1576040805162461bcd60e51b815260206004820152601e602482015260008051602061140e833981519152604482015290519081900360640190fd5b600b80546001600160a01b0319166001600160a01b0385169081179091556040517fe4a7aa392aa8af59de6ac68803eaa9d30d79f8070671a2561595a72800f6e27190600090a250600192915050565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156105ad5780601f10610582576101008083540402835291602001916105ad565b820191906000526020600020905b81548152906001019060200180831161059057829003601f168201915b5050505050905090565b60006105cb6105c4610b40565b8484610b44565b5060015b92915050565b60025490565b60006105e8848484610c30565b610658846105f4610b40565b6106538560405180606001604052806028815260200161133d602891396001600160a01b038a16600090815260016020526040812090610632610b40565b6001600160a01b031681526020810191909152604001600020549190610d79565b610b44565b5060019392505050565b6000826001600160a01b0381166106ae576040805162461bcd60e51b815260206004820152601e602482015260008051602061140e833981519152604482015290519081900360640190fd5b336106b761088e565b6001600160a01b031614806106d65750600b546001600160a01b031633145b610715576040805162461bcd60e51b815260206004820152601b60248201526000805160206112af833981519152604482015290519081900360640190fd5b61071f8484610e10565b5092915050565b60055460ff1690565b60006105cb61073c610b40565b84610653856001600061074d610b40565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490610eee565b6001600160a01b0382166000908152600660205260408120819081906107a4908590610f4d565b91509150816107bb576107b6856107d5565b6107bd565b805b95945050505050565b600b546001600160a01b031681565b6001600160a01b0381166000908152602081905260409020545b919050565b6107fc610b40565b6001600160a01b031661080d61088e565b6001600160a01b031614610856576040805162461bcd60e51b81526020600482018190526024820152600080516020611365833981519152604482015290519081900360640190fd5b600a546040516000916001600160a01b031690600080516020611385833981519152908390a3600a80546001600160a01b0319169055565b600a546001600160a01b031690565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156105ad5780601f10610582576101008083540402835291602001916105ad565b600c5481565b3361090d61088e565b6001600160a01b0316148061092c5750600b546001600160a01b031633145b61096b576040805162461bcd60e51b815260206004820152601b60248201526000805160206112af833981519152604482015290519081900360640190fd5b61097361104a565b600c55565b6000806000610988846007610f4d565b915091508161099e576109996105d5565b6109a0565b805b949350505050565b60006105cb6109b5610b40565b846106538560405180606001604052806025815260200161142e60259139600160006109df610b40565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190610d79565b60006105cb610a1d610b40565b8484610c30565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b610a57610b40565b6001600160a01b0316610a6861088e565b6001600160a01b031614610ab1576040805162461bcd60e51b81526020600482018190526024820152600080516020611365833981519152604482015290519081900360640190fd5b6001600160a01b038116610af65760405162461bcd60e51b81526004018080602001828103825260268152602001806112cf6026913960400191505060405180910390fd5b600a546040516001600160a01b0380841692169060008051602061138583398151915290600090a3600a80546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b6001600160a01b038316610b895760405162461bcd60e51b81526004018080602001828103825260248152602001806113ea6024913960400191505060405180910390fd5b6001600160a01b038216610bce5760405162461bcd60e51b81526004018080602001828103825260228152602001806112f56022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316610c755760405162461bcd60e51b81526004018080602001828103825260258152602001806113c56025913960400191505060405180910390fd5b6001600160a01b038216610cba5760405162461bcd60e51b815260040180806020018281038252602381526020018061128c6023913960400191505060405180910390fd5b610cc583838361109e565b610d0281604051806060016040528060268152602001611317602691396001600160a01b0386166000908152602081905260409020549190610d79565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610d319082610eee565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716926000805160206113a583398151915292918290030190a3505050565b60008184841115610e085760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610dcd578181015183820152602001610db5565b50505050905090810190601f168015610dfa5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6001600160a01b038216610e6b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b610e776000838361109e565b600254610e849082610eee565b6002556001600160a01b038216600090815260208190526040902054610eaa9082610eee565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391926000805160206113a58339815191529281900390910190a35050565b600082820183811015610f46576040805162461bcd60e51b815260206004820152601b60248201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b604482015290519081900360640190fd5b9392505050565b60008060008411610f9e576040805162461bcd60e51b815260206004820152601660248201527504552433230536e617073686f743a20696420697320360541b604482015290519081900360640190fd5b610fa860096110fb565b841115610ffc576040805162461bcd60e51b815260206004820152601d60248201527f4552433230536e617073686f743a206e6f6e6578697374656e74206964000000604482015290519081900360640190fd5b600061100884866110ff565b8454909150811415611021576000809250925050611043565b600184600101828154811061103257fe5b906000526020600020015492509250505b9250929050565b600061105660096111a0565b600061106260096110fb565b6040805182815290519192507f8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb67919081900360200190a1905090565b6110a98383836110f6565b6001600160a01b0383166110cd576110c0826111a9565b6110c86111d6565b6110f6565b6001600160a01b0382166110e4576110c0836111a9565b6110ed836111a9565b6110f6826111a9565b505050565b5490565b8154600090611110575060006105cf565b82546000905b8082101561115f57600061112a83836111e5565b90508486828154811061113957fe5b9060005260206000200154111561115257809150611159565b8060010192505b50611116565b60008211801561118757508385600184038154811061117a57fe5b9060005260206000200154145b1561119857506000190190506105cf565b5090506105cf565b80546001019055565b6001600160a01b03811660009081526006602052604090206111d3906111ce836107d5565b61120a565b50565b6111e360076111ce6105d5565b565b600060028083066002850601816111f857fe5b04600283046002850401019392505050565b600061121660096110fb565b90508061122284611256565b10156110f6578254600180820185556000858152602080822090930193909355938401805494850181558252902090910155565b8054600090611267575060006107ef565b81548290600019810190811061127957fe5b906000526020600020015490506107ef56fe45524332303a207472616e7366657220746f20746865207a65726f2061646472657373417574683a2043616c6c6572206973206e6f7420616c6c6f77656400000000004f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65728be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef45524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737356616c69643a2043616e6e6f7420757365207a65726f2061646472657373000045524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220cc5ba14dcae6ba5b56b98faf5d3d25480689a6c7aaa6a86d5526e62531ca456164736f6c63430007060033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000c426c6f636b4875622044414f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005424844414f000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : tokenName (string): BlockHub DAO
Arg [1] : tokenSymbol (string): BHDAO
Arg [2] : tokenDecimals (uint8): 18
-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000012
Arg [3] : 000000000000000000000000000000000000000000000000000000000000000c
Arg [4] : 426c6f636b4875622044414f0000000000000000000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [6] : 424844414f000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.