ERC-20
Overview
Max Total Supply
2,000,000 Ham ham ham
Holders
32
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
820.548499669108256103 Ham ham hamValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
HAMDelegator
Compiler Version
v0.5.17+commit.d19bba13
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity 0.5.17; import "./HAMTokenInterface.sol"; import "./HAMDelegate.sol"; contract HAMDelegator is HAMTokenInterface, HAMDelegatorInterface { /** * @notice Construct a new HAM * @param name_ ERC-20 name of this token * @param symbol_ ERC-20 symbol of this token * @param decimals_ ERC-20 decimal precision of this token * @param initSupply_ Initial token amount * @param implementation_ The address of the implementation the contract delegates to * @param becomeImplementationData The encoded args for becomeImplementation */ constructor( string memory name_, string memory symbol_, uint8 decimals_, uint256 initSupply_, address implementation_, bytes memory becomeImplementationData ) public { // Creator of the contract is gov during initialization gov = msg.sender; // First delegate gets to initialize the delegator (i.e. storage contract) delegateTo( implementation_, abi.encodeWithSignature( "initialize(string,string,uint8,address,uint256)", name_, symbol_, decimals_, msg.sender, initSupply_ ) ); // New implementations always get set via the settor (post-initialize) _setImplementation(implementation_, false, becomeImplementationData); } /** * @notice Called by the gov to update the implementation of the delegator * @param implementation_ The address of the new implementation for delegation * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation */ function _setImplementation(address implementation_, bool allowResign, bytes memory becomeImplementationData) public { require(msg.sender == gov, "HAMDelegator::_setImplementation: Caller must be gov"); if (allowResign) { delegateToImplementation(abi.encodeWithSignature("_resignImplementation()")); } address oldImplementation = implementation; implementation = implementation_; delegateToImplementation(abi.encodeWithSignature("_becomeImplementation(bytes)", becomeImplementationData)); emit NewImplementation(oldImplementation, implementation); } /** * @notice Sender supplies assets into the market and receives cTokens in exchange * @dev Accrues interest whether or not the operation succeeds, unless reverted * @param mintAmount The amount of the underlying asset to supply * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function mint(address to, uint256 mintAmount) external returns (bool) { to; mintAmount; // Shh delegateAndReturn(); } /** * @notice Transfer `amount` tokens from `msg.sender` to `dst` * @param dst The address of the destination account * @param amount The number of tokens to transfer * @return Whether or not the transfer succeeded */ function transfer(address dst, uint256 amount) external returns (bool) { dst; amount; // Shh delegateAndReturn(); } /** * @notice Transfer `amount` tokens from `src` to `dst` * @param src The address of the source account * @param dst The address of the destination account * @param amount The number of tokens to transfer * @return Whether or not the transfer succeeded */ function transferFrom( address src, address dst, uint256 amount ) external returns (bool) { src; dst; amount; // Shh delegateAndReturn(); } /** * @notice Approve `spender` to transfer up to `amount` from `src` * @dev This will overwrite the approval amount for `spender` * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve) * @param spender The address of the account which may transfer tokens * @param amount The number of tokens that are approved (-1 means infinite) * @return Whether or not the approval succeeded */ function approve( address spender, uint256 amount ) external returns (bool) { spender; amount; // Shh delegateAndReturn(); } /** * @dev Increase the amount of tokens that an owner has allowed to a spender. * This method should be used instead of approve() to avoid the double approval vulnerability * described above. * @param spender The address which will spend the funds. * @param addedValue The amount of tokens to increase the allowance by. */ function increaseAllowance( address spender, uint256 addedValue ) external returns (bool) { spender; addedValue; // Shh delegateAndReturn(); } function maxScalingFactor() external view returns (uint256) { delegateToViewAndReturn(); } function rebase( uint256 epoch, uint256 indexDelta, bool positive ) external returns (uint256) { epoch; indexDelta; positive; delegateAndReturn(); } /** * @dev Decrease the amount of tokens that an owner has allowed to a spender. * * @param spender The address which will spend the funds. * @param subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseAllowance( address spender, uint256 subtractedValue ) external returns (bool) { spender; subtractedValue; // Shh delegateAndReturn(); } /** * @notice Get the current allowance from `owner` for `spender` * @param owner The address of the account which owns the tokens to be spent * @param spender The address of the account which may transfer tokens * @return The number of tokens allowed to be spent (-1 means infinite) */ function allowance( address owner, address spender ) external view returns (uint256) { owner; spender; // Shh delegateToViewAndReturn(); } /** * @notice Get the current allowance from `owner` for `spender` * @param delegator The address of the account which has designated a delegate * @return Address of delegatee */ function delegates( address delegator ) external view returns (address) { delegator; // Shh delegateToViewAndReturn(); } /** * @notice Get the token balance of the `owner` * @param owner The address of the account to query * @return The number of tokens owned by `owner` */ function balanceOf(address owner) external view returns (uint256) { owner; // Shh delegateToViewAndReturn(); } /** * @notice Currently unused. For future compatability * @param owner The address of the account to query * @return The number of underlying tokens owned by `owner` */ function balanceOfUnderlying(address owner) external view returns (uint256) { owner; // Shh delegateToViewAndReturn(); } /*** Gov Functions ***/ /** * @notice Begins transfer of gov rights. The newPendingGov must call `_acceptGov` to finalize the transfer. * @dev Gov function to begin change of gov. The newPendingGov must call `_acceptGov` to finalize the transfer. * @param newPendingGov New pending gov. */ function _setPendingGov(address newPendingGov) external { newPendingGov; // Shh delegateAndReturn(); } function _setRebaser(address rebaser_) external { rebaser_; // Shh delegateAndReturn(); } function _setIncentivizer(address incentivizer_) external { incentivizer_; // Shh delegateAndReturn(); } /** * @notice Accepts transfer of gov rights. msg.sender must be pendingGov * @dev Gov function for pending gov to accept role and update gov * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function _acceptGov() external { delegateAndReturn(); } function getPriorVotes(address account, uint blockNumber) external view returns (uint256) { account; blockNumber; delegateToViewAndReturn(); } function delegateBySig( address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s ) external { delegatee; nonce; expiry; v; r; s; delegateAndReturn(); } function delegate(address delegatee) external { delegatee; delegateAndReturn(); } function getCurrentVotes(address account) external view returns (uint256) { account; delegateToViewAndReturn(); } function setFarmRegistry(address registry) external { registry; delegateAndReturn(); } /** * @notice Internal method to delegate execution to another contract * @dev It returns to the external caller whatever the implementation returns or forwards reverts * @param callee The contract to delegatecall * @param data The raw data to delegatecall * @return The returned bytes from the delegatecall */ function delegateTo(address callee, bytes memory data) internal returns (bytes memory) { (bool success, bytes memory returnData) = callee.delegatecall(data); assembly { if eq(success, 0) { revert(add(returnData, 0x20), returndatasize) } } return returnData; } /** * @notice Delegates execution to the implementation contract * @dev It returns to the external caller whatever the implementation returns or forwards reverts * @param data The raw data to delegatecall * @return The returned bytes from the delegatecall */ function delegateToImplementation(bytes memory data) public returns (bytes memory) { return delegateTo(implementation, data); } /** * @notice Delegates execution to an implementation contract * @dev It returns to the external caller whatever the implementation returns or forwards reverts * There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop. * @param data The raw data to delegatecall * @return The returned bytes from the delegatecall */ function delegateToViewImplementation(bytes memory data) public view returns (bytes memory) { (bool success, bytes memory returnData) = address(this).staticcall(abi.encodeWithSignature("delegateToImplementation(bytes)", data)); assembly { if eq(success, 0) { revert(add(returnData, 0x20), returndatasize) } } return abi.decode(returnData, (bytes)); } function delegateToViewAndReturn() private view returns (bytes memory) { (bool success, ) = address(this).staticcall(abi.encodeWithSignature("delegateToImplementation(bytes)", msg.data)); assembly { let free_mem_ptr := mload(0x40) returndatacopy(free_mem_ptr, 0, returndatasize) switch success case 0 { revert(free_mem_ptr, returndatasize) } default { return(add(free_mem_ptr, 0x40), returndatasize) } } } function delegateAndReturn() private returns (bytes memory) { (bool success, ) = implementation.delegatecall(msg.data); assembly { let free_mem_ptr := mload(0x40) returndatacopy(free_mem_ptr, 0, returndatasize) switch success case 0 { revert(free_mem_ptr, returndatasize) } default { return(free_mem_ptr, returndatasize) } } } /** * @notice Delegates execution to an implementation contract * @dev It returns to the external caller whatever the implementation returns or forwards reverts */ function () external payable { require(msg.value == 0,"HAMDelegator:fallback: cannot send value to fallback"); // delegate all other functions to current implementation delegateAndReturn(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.5.17; /** * @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, 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) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * 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); uint256 c = a - b; return c; } /** * @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) { // 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 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts 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) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts 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) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
pragma solidity 0.5.17; import "./HAMGovernance.sol"; contract HAMToken is HAMGovernanceToken { // Modifiers modifier onlyGov() { require(msg.sender == gov); _; } modifier onlyRebaser() { require(msg.sender == rebaser); _; } modifier onlyMinter() { require(msg.sender == rebaser || msg.sender == incentivizer || msg.sender == gov, "not minter"); _; } modifier validRecipient(address to) { require(to != address(0x0)); require(to != address(this)); _; } function initialize( string memory name_, string memory symbol_, uint8 decimals_ ) public { require(hamsScalingFactor == 0, "already initialized"); name = name_; symbol = symbol_; decimals = decimals_; } /** * @notice Computes the current max scaling factor */ function maxScalingFactor() external view returns (uint256) { return _maxScalingFactor(); } function _maxScalingFactor() internal view returns (uint256) { // scaling factor can only go up to 2**256-1 = initSupply * hamsScalingFactor // this is used to check if hamsScalingFactor will be too high to compute balances when rebasing. return uint256(-1) / initSupply; } /** * @notice Mints new tokens, increasing totalSupply, initSupply, and a users balance. * @dev Limited to onlyMinter modifier */ function mint(address to, uint256 amount) external onlyMinter returns (bool) { _mint(to, amount); return true; } function _mint(address to, uint256 amount) internal { // increase totalSupply totalSupply = totalSupply.add(amount); // get underlying value uint256 hamValue = amount.mul(internalDecimals).div(hamsScalingFactor); // increase initSupply initSupply = initSupply.add(hamValue); // make sure the mint didnt push maxScalingFactor too low require(hamsScalingFactor <= _maxScalingFactor(), "max scaling factor too low"); // add balance _hamBalances[to] = _hamBalances[to].add(hamValue); // add delegates to the minter _moveDelegates(address(0), _delegates[to], hamValue); emit Mint(to, amount); } /* - ERC20 functionality - */ /** * @dev Transfer tokens to a specified address. * @param to The address to transfer to. * @param value The amount to be transferred. * @return True on success, false otherwise. */ function transfer(address to, uint256 value) external validRecipient(to) returns (bool) { // underlying balance is stored in hams, so divide by current scaling factor // note, this means as scaling factor grows, dust will be untransferrable. // minimum transfer value == hamsScalingFactor / 1e24; // get amount in underlying uint256 hamValue = value.mul(internalDecimals).div(hamsScalingFactor); // sub from balance of sender _hamBalances[msg.sender] = _hamBalances[msg.sender].sub(hamValue); // add to balance of receiver _hamBalances[to] = _hamBalances[to].add(hamValue); emit Transfer(msg.sender, to, value); _moveDelegates(_delegates[msg.sender], _delegates[to], hamValue); return true; } /** * @dev Transfer tokens from one address to another. * @param from The address you want to send tokens from. * @param to The address you want to transfer to. * @param value The amount of tokens to be transferred. */ function transferFrom(address from, address to, uint256 value) external validRecipient(to) returns (bool) { // decrease allowance _allowedFragments[from][msg.sender] = _allowedFragments[from][msg.sender].sub(value); // get value in hams uint256 hamValue = value.mul(internalDecimals).div(hamsScalingFactor); // sub from from _hamBalances[from] = _hamBalances[from].sub(hamValue); _hamBalances[to] = _hamBalances[to].add(hamValue); emit Transfer(from, to, value); _moveDelegates(_delegates[from], _delegates[to], hamValue); return true; } /** * @param who The address to query. * @return The balance of the specified address. */ function balanceOf(address who) external view returns (uint256) { return _hamBalances[who].mul(hamsScalingFactor).div(internalDecimals); } /** @notice Currently returns the internal storage amount * @param who The address to query. * @return The underlying balance of the specified address. */ function balanceOfUnderlying(address who) external view returns (uint256) { return _hamBalances[who]; } /** * @dev Function to check the amount of tokens that an owner has allowed to a spender. * @param owner_ The address which owns the funds. * @param spender The address which will spend the funds. * @return The number of tokens still available for the spender. */ function allowance(address owner_, address spender) external view returns (uint256) { return _allowedFragments[owner_][spender]; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of * msg.sender. This method is included for ERC20 compatibility. * increaseAllowance and decreaseAllowance should be used instead. * Changing an allowance with this method brings the risk that someone may transfer both * the old and the new allowance - if they are both greater than zero - if a transfer * transaction is mined before the later approve() call is mined. * * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. */ function approve(address spender, uint256 value) external returns (bool) { _allowedFragments[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); return true; } /** * @dev Increase the amount of tokens that an owner has allowed to a spender. * This method should be used instead of approve() to avoid the double approval vulnerability * described above. * @param spender The address which will spend the funds. * @param addedValue The amount of tokens to increase the allowance by. */ function increaseAllowance(address spender, uint256 addedValue) external returns (bool) { _allowedFragments[msg.sender][spender] = _allowedFragments[msg.sender][spender].add(addedValue); emit Approval(msg.sender, spender, _allowedFragments[msg.sender][spender]); return true; } /** * @dev Decrease the amount of tokens that an owner has allowed to a spender. * * @param spender The address which will spend the funds. * @param subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool) { uint256 oldValue = _allowedFragments[msg.sender][spender]; if (subtractedValue >= oldValue) { _allowedFragments[msg.sender][spender] = 0; } else { _allowedFragments[msg.sender][spender] = oldValue.sub(subtractedValue); } emit Approval(msg.sender, spender, _allowedFragments[msg.sender][spender]); return true; } /* - Governance Functions - */ /** @notice sets the rebaser * @param rebaser_ The address of the rebaser contract to use for authentication. */ function _setRebaser(address rebaser_) external onlyGov { address oldRebaser = rebaser; rebaser = rebaser_; emit NewRebaser(oldRebaser, rebaser_); } /** @notice sets the incentivizer * @param incentivizer_ The address of the incentivizer contract to use for authentication. */ function _setIncentivizer(address incentivizer_) external onlyGov { address oldIncentivizer = incentivizer; incentivizer = incentivizer_; emit NewIncentivizer(oldIncentivizer, incentivizer_); } /** @notice sets the pendingGov * @param pendingGov_ The address of the rebaser contract to use for authentication. */ function _setPendingGov(address pendingGov_) external onlyGov { address oldPendingGov = pendingGov; pendingGov = pendingGov_; emit NewPendingGov(oldPendingGov, pendingGov_); } /** @notice lets msg.sender accept governance * */ function _acceptGov() external { require(msg.sender == pendingGov, "!pending"); address oldGov = gov; gov = pendingGov; pendingGov = address(0); emit NewGov(oldGov, gov); } /* - Extras - */ /** * @notice Initiates a new rebase operation, provided the minimum time period has elapsed. * * @dev The supply adjustment equals (totalSupply * DeviationFromTargetRate) / rebaseLag * Where DeviationFromTargetRate is (MarketOracleRate - targetRate) / targetRate * and targetRate is CpiOracleRate / baseCpi */ function rebase( uint256 epoch, uint256 indexDelta, bool positive ) external onlyRebaser returns (uint256) { if (indexDelta == 0) { emit Rebase(epoch, hamsScalingFactor, hamsScalingFactor); return totalSupply; } uint256 prevHamsScalingFactor = hamsScalingFactor; if (!positive) { hamsScalingFactor = hamsScalingFactor.mul(BASE.sub(indexDelta)).div(BASE); } else { uint256 newScalingFactor = hamsScalingFactor.mul(BASE.add(indexDelta)).div(BASE); if (newScalingFactor < _maxScalingFactor()) { hamsScalingFactor = newScalingFactor; } else { hamsScalingFactor = _maxScalingFactor(); } } totalSupply = initSupply.mul(hamsScalingFactor).div(BASE); emit Rebase(epoch, prevHamsScalingFactor, hamsScalingFactor); return totalSupply; } } contract HAM is HAMToken { /** * @notice Initialize the new money market * @param name_ ERC-20 name of this token * @param symbol_ ERC-20 symbol of this token * @param decimals_ ERC-20 decimal precision of this token */ function initialize( string memory name_, string memory symbol_, uint8 decimals_, address initialOwner, uint256 initSupply_ ) public { require(initSupply_ > 0, "0 init supply"); super.initialize(name_, symbol_, decimals_); initSupply = initSupply_.mul(10**24/ (BASE)); totalSupply = initSupply_; hamsScalingFactor = BASE; _hamBalances[initialOwner] = initSupply_.mul(10**24 / (BASE)); farmRegistry = address(0); } function setFarmRegistry(address registry) external onlyGov { farmRegistry = registry; } }
pragma solidity 0.5.17; import "./HAM.sol"; contract HAMDelegationStorage { /** * @notice Implementation address for this contract */ address public implementation; } contract HAMDelegatorInterface is HAMDelegationStorage { /** * @notice Emitted when implementation is changed */ event NewImplementation(address oldImplementation, address newImplementation); /** * @notice Called by the gov to update the implementation of the delegator * @param implementation_ The address of the new implementation for delegation * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation */ function _setImplementation(address implementation_, bool allowResign, bytes memory becomeImplementationData) public; } contract HAMDelegateInterface is HAMDelegationStorage { /** * @notice Called by the delegator on a delegate to initialize it for duty * @dev Should revert if any issues arise which make it unfit for delegation * @param data The encoded bytes data for any initialization */ function _becomeImplementation(bytes memory data) public; /** * @notice Called by the delegator on a delegate to forfeit its responsibility */ function _resignImplementation() public; } contract HAMDelegate is HAM, HAMDelegateInterface { /** * @notice Construct an empty delegate */ constructor() public {} /** * @notice Called by the delegator on a delegate to initialize it for duty * @param data The encoded bytes data for any initialization */ function _becomeImplementation(bytes memory data) public { // Shh -- currently unused data; // Shh -- we don't ever want this hook to be marked pure if (false) { implementation = address(0); } require(msg.sender == gov, "only the gov may call _becomeImplementation"); } /** * @notice Called by the delegator on a delegate to forfeit its responsibility */ function _resignImplementation() public { // Shh -- we don't ever want this hook to be marked pure if (false) { implementation = address(0); } require(msg.sender == gov, "only the gov may call _resignImplementation"); } }
pragma solidity 0.5.17; pragma experimental ABIEncoderV2; import "./HAMGovernanceStorage.sol"; import "./HAMTokenInterface.sol"; contract HAMGovernanceToken is HAMTokenInterface { /// @notice An event thats emitted when an account changes its delegate event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate); /// @notice An event thats emitted when a delegate account's vote balance changes event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance); /** * @notice Get the delegate for a delegator address * @param delegator The address to get delegates for */ function delegates(address delegator) external view returns (address) { return _delegates[delegator]; } /** * @notice Delegate votes from `msg.sender` to `delegatee` * @param delegatee The address to delegate votes to */ function delegate(address delegatee) external { return _delegate(msg.sender, delegatee); } /** * @notice Delegates votes from signatory to `delegatee` * @param delegatee The address to delegate votes to * @param nonce The contract state required to match the signature * @param expiry The time at which to expire the signature * @param v The recovery byte of the signature * @param r Half of the ECDSA signature pair * @param s Half of the ECDSA signature pair */ function delegateBySig( address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s ) external { bytes32 domainSeparator = keccak256( abi.encode( DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this) ) ); bytes32 structHash = keccak256( abi.encode( DELEGATION_TYPEHASH, delegatee, nonce, expiry ) ); bytes32 digest = keccak256( abi.encodePacked( "\x19\x01", domainSeparator, structHash ) ); address signatory = ecrecover(digest, v, r, s); require(signatory != address(0), "HAM::delegateBySig: invalid signature"); require(nonce == nonces[signatory]++, "HAM::delegateBySig: invalid nonce"); require(now <= expiry, "HAM::delegateBySig: signature expired"); return _delegate(signatory, delegatee); } /** * @notice Gets the current votes balance for `account` * @param account The address to get votes balance * @return The number of current votes for `account` */ function getCurrentVotes(address account) external view returns (uint256) { uint32 nCheckpoints = numCheckpoints[account]; return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0; } /** * @notice Determine the prior number of votes for an account as of a block number * @dev Block number must be a finalized block or else this function will revert to prevent misinformation. * @param account The address of the account to check * @param blockNumber The block number to get the vote balance at * @return The number of votes the account had as of the given block */ function getPriorVotes(address account, uint blockNumber) external view returns (uint256) { require(blockNumber < block.number, "HAM::getPriorVotes: not yet determined"); uint32 nCheckpoints = numCheckpoints[account]; if (nCheckpoints == 0) { return 0; } // First check most recent balance if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) { return checkpoints[account][nCheckpoints - 1].votes; } // Next check implicit zero balance if (checkpoints[account][0].fromBlock > blockNumber) { return 0; } uint32 lower = 0; uint32 upper = nCheckpoints - 1; while (upper > lower) { uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow Checkpoint memory cp = checkpoints[account][center]; if (cp.fromBlock == blockNumber) { return cp.votes; } else if (cp.fromBlock < blockNumber) { lower = center; } else { upper = center - 1; } } return checkpoints[account][lower].votes; } function _delegate(address delegator, address delegatee) internal { address currentDelegate = _delegates[delegator]; uint256 delegatorBalance = _hamBalances[delegator]; // balance of underlying HAMs (not scaled); _delegates[delegator] = delegatee; emit DelegateChanged(delegator, currentDelegate, delegatee); _moveDelegates(currentDelegate, delegatee, delegatorBalance); } function _moveDelegates(address srcRep, address dstRep, uint256 amount) internal { if (srcRep != dstRep && amount > 0) { if (srcRep != address(0)) { // decrease old representative uint32 srcRepNum = numCheckpoints[srcRep]; uint256 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0; uint256 srcRepNew = srcRepOld.sub(amount); _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew); } if (dstRep != address(0)) { // increase new representative uint32 dstRepNum = numCheckpoints[dstRep]; uint256 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0; uint256 dstRepNew = dstRepOld.add(amount); _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew); } } } function _writeCheckpoint( address delegatee, uint32 nCheckpoints, uint256 oldVotes, uint256 newVotes ) internal { uint32 blockNumber = safe32(block.number, "HAM::_writeCheckpoint: block number exceeds 32 bits"); if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) { checkpoints[delegatee][nCheckpoints - 1].votes = newVotes; } else { checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes); numCheckpoints[delegatee] = nCheckpoints + 1; } emit DelegateVotesChanged(delegatee, oldVotes, newVotes); } function safe32(uint n, string memory errorMessage) internal pure returns (uint32) { require(n < 2**32, errorMessage); return uint32(n); } function getChainId() internal pure returns (uint) { uint256 chainId; assembly { chainId := chainid() } return chainId; } }
pragma solidity 0.5.17; pragma experimental ABIEncoderV2; contract HAMGovernanceStorage { /// @notice A record of each accounts delegate mapping (address => address) internal _delegates; /// @notice A checkpoint for marking number of votes from a given block struct Checkpoint { uint32 fromBlock; uint256 votes; } /// @notice A record of votes checkpoints for each account, by index mapping (address => mapping (uint32 => Checkpoint)) public checkpoints; /// @notice The number of checkpoints for each account mapping (address => uint32) public numCheckpoints; /// @notice The EIP-712 typehash for the contract's domain bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); /// @notice The EIP-712 typehash for the delegation struct used by the contract bytes32 public constant DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)"); /// @notice A record of states for signing / validating signatures mapping (address => uint) public nonces; }
pragma solidity 0.5.17; import "./HAMTokenStorage.sol"; import "./HAMGovernanceStorage.sol"; contract HAMTokenInterface is HAMTokenStorage, HAMGovernanceStorage { /// @notice An event thats emitted when an account changes its delegate event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate); /// @notice An event thats emitted when a delegate account's vote balance changes event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance); /** * @notice Event emitted when tokens are rebased */ event Rebase(uint256 epoch, uint256 prevHamsScalingFactor, uint256 newHamsScalingFactor); /*** Gov Events ***/ /** * @notice Event emitted when pendingGov is changed */ event NewPendingGov(address oldPendingGov, address newPendingGov); /** * @notice Event emitted when gov is changed */ event NewGov(address oldGov, address newGov); /** * @notice Sets the rebaser contract */ event NewRebaser(address oldRebaser, address newRebaser); /** * @notice Sets the incentivizer contract */ event NewIncentivizer(address oldIncentivizer, address newIncentivizer); /* - ERC20 Events - */ /** * @notice EIP20 Transfer event */ event Transfer(address indexed from, address indexed to, uint amount); /** * @notice EIP20 Approval event */ event Approval(address indexed owner, address indexed spender, uint amount); /* - Extra Events - */ /** * @notice Tokens minted event */ event Mint(address to, uint256 amount); // Public functions function transfer(address to, uint256 value) external returns(bool); function transferFrom(address from, address to, uint256 value) external returns(bool); function balanceOf(address who) external view returns(uint256); function balanceOfUnderlying(address who) external view returns(uint256); function allowance(address owner_, address spender) external view returns(uint256); function approve(address spender, uint256 value) external returns (bool); function increaseAllowance(address spender, uint256 addedValue) external returns (bool); function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool); function maxScalingFactor() external view returns (uint256); /* - Governance Functions - */ function getPriorVotes(address account, uint blockNumber) external view returns (uint256); function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) external; function delegate(address delegatee) external; function delegates(address delegator) external view returns (address); function getCurrentVotes(address account) external view returns (uint256); /* - Permissioned/Governance functions - */ function mint(address to, uint256 amount) external returns (bool); function rebase(uint256 epoch, uint256 indexDelta, bool positive) external returns (uint256); function _setRebaser(address rebaser_) external; function _setIncentivizer(address incentivizer_) external; function _setPendingGov(address pendingGov_) external; function _acceptGov() external; }
pragma solidity 0.5.17; import "../lib/SafeMath.sol"; // Storage for a HAM token contract HAMTokenStorage { using SafeMath for uint256; /** * @dev Guard variable for re-entrancy checks. Not currently used */ bool internal _notEntered; /** * @notice EIP-20 token name for this token */ string public name; /** * @notice EIP-20 token symbol for this token */ string public symbol; /** * @notice EIP-20 token decimals for this token */ uint8 public decimals; /** * @notice Governor for this contract */ address public gov; /** * @notice Pending governance for this contract */ address public pendingGov; /** * @notice Approved rebaser for this contract */ address public rebaser; /** * @notice Reserve address of HAM protocol */ address public incentivizer; /** * @notice Total supply of HAMs */ uint256 public totalSupply; /** * @notice Internal decimals used to handle scaling factor */ uint256 public constant internalDecimals = 10**24; /** * @notice Used for percentage maths */ uint256 public constant BASE = 10**18; /** * @notice Scaling factor that adjusts everyone's balances */ uint256 public hamsScalingFactor; mapping (address => uint256) internal _hamBalances; mapping (address => mapping (address => uint256)) internal _allowedFragments; uint256 public initSupply; address public farmRegistry; }
{ "evmVersion": "istanbul", "libraries": {}, "metadata": { "useLiteralContent": true }, "optimizer": { "enabled": false, "runs": 200 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"uint8","name":"decimals_","type":"uint8"},{"internalType":"uint256","name":"initSupply_","type":"uint256"},{"internalType":"address","name":"implementation_","type":"address"},{"internalType":"bytes","name":"becomeImplementationData","type":"bytes"}],"payable":false,"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":"amount","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegator","type":"address"},{"indexed":true,"internalType":"address","name":"fromDelegate","type":"address"},{"indexed":true,"internalType":"address","name":"toDelegate","type":"address"}],"name":"DelegateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":false,"internalType":"uint256","name":"previousBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBalance","type":"uint256"}],"name":"DelegateVotesChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldGov","type":"address"},{"indexed":false,"internalType":"address","name":"newGov","type":"address"}],"name":"NewGov","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldImplementation","type":"address"},{"indexed":false,"internalType":"address","name":"newImplementation","type":"address"}],"name":"NewImplementation","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldIncentivizer","type":"address"},{"indexed":false,"internalType":"address","name":"newIncentivizer","type":"address"}],"name":"NewIncentivizer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldPendingGov","type":"address"},{"indexed":false,"internalType":"address","name":"newPendingGov","type":"address"}],"name":"NewPendingGov","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldRebaser","type":"address"},{"indexed":false,"internalType":"address","name":"newRebaser","type":"address"}],"name":"NewRebaser","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"prevHamsScalingFactor","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newHamsScalingFactor","type":"uint256"}],"name":"Rebase","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"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"constant":true,"inputs":[],"name":"BASE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"DELEGATION_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"DOMAIN_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"_acceptGov","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"implementation_","type":"address"},{"internalType":"bool","name":"allowResign","type":"bool"},{"internalType":"bytes","name":"becomeImplementationData","type":"bytes"}],"name":"_setImplementation","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"incentivizer_","type":"address"}],"name":"_setIncentivizer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newPendingGov","type":"address"}],"name":"_setPendingGov","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"rebaser_","type":"address"}],"name":"_setRebaser","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOfUnderlying","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint32","name":"","type":"uint32"}],"name":"checkpoints","outputs":[{"internalType":"uint32","name":"fromBlock","type":"uint32"},{"internalType":"uint256","name":"votes","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"delegatee","type":"address"}],"name":"delegate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"delegatee","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"delegateBySig","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"delegateToImplementation","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"delegateToViewImplementation","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"delegator","type":"address"}],"name":"delegates","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"farmRegistry","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getCurrentVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"getPriorVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"gov","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"hamsScalingFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"incentivizer","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"initSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"internalDecimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"maxScalingFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"mintAmount","type":"uint256"}],"name":"mint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"numCheckpoints","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pendingGov","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"uint256","name":"indexDelta","type":"uint256"},{"internalType":"bool","name":"positive","type":"bool"}],"name":"rebase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"rebaser","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"registry","type":"address"}],"name":"setFarmRegistry","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"src","type":"address"},{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162002c9038038062002c90833981810160405260c08110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b838201915060208201858111156200006f57600080fd5b82518660018202830111640100000000821117156200008d57600080fd5b8083526020830192505050908051906020019080838360005b83811015620000c3578082015181840152602081019050620000a6565b50505050905090810190601f168015620000f15780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011557600080fd5b838201915060208201858111156200012c57600080fd5b82518660018202830111640100000000821117156200014a57600080fd5b8083526020830192505050908051906020019080838360005b838110156200018057808201518184015260208101905062000163565b50505050905090810190601f168015620001ae5780820380516001836020036101000a031916815260200191505b5060405260200180519060200190929190805190602001909291908051906020019092919080516040519392919084640100000000821115620001f057600080fd5b838201915060208201858111156200020757600080fd5b82518660018202830111640100000000821117156200022557600080fd5b8083526020830192505050908051906020019080838360005b838110156200025b5780820151818401526020810190506200023e565b50505050905090810190601f168015620002895780820380516001836020036101000a031916815260200191505b5060405250505033600360016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620004928287878733886040516024018080602001806020018660ff1660ff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001848152602001838103835288818151815260200191508051906020019080838360005b83811015620003685780820151818401526020810190506200034b565b50505050905090810190601f168015620003965780820380516001836020036101000a031916815260200191505b50838103825287818151815260200191508051906020019080838360005b83811015620003d1578082015181840152602081019050620003b4565b50505050905090810190601f168015620003ff5780820380516001836020036101000a031916815260200191505b509750505050505050506040516020818303038152906040527f6c945221000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050620004b360201b60201c565b50620004a7826000836200058e60201b60201c565b5050505050506200093d565b6060600060608473ffffffffffffffffffffffffffffffffffffffff16846040518082805190602001908083835b60208310620005065780518252602082019150602081019050602083039250620004e1565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811462000568576040519150601f19603f3d011682016040523d82523d6000602084013e6200056d565b606091505b5091509150600082141562000583573d60208201fd5b809250505092915050565b600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161462000636576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603481526020018062002c5c6034913960400191505060405180910390fd5b8115620006d257620006d06040516024016040516020818303038152906040527f153ab505000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506200090060201b60201c565b505b6000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905083601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555062000840826040516024018080602001828103825283818151815260200191508051906020019080838360005b838110156200078457808201518184015260208101905062000767565b50505050905090810190601f168015620007b25780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040527f56e67728000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506200090060201b60201c565b507fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a81601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150505050565b606062000936601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683620004b360201b60201c565b9050919050565b61230f806200094d6000396000f3fe60806040526004361061025c5760003560e01c806364dd48f51161014457806398dca210116100b6578063da1fef391161007a578063da1fef3914611285578063dd62ed3e146112b0578063e7a324dc14611335578063ec342ad014611360578063f1127ed81461138b578063fa8f3455146114135761025c565b806398dca21014611063578063a457c2d7146110b4578063a9059cbb14611127578063b4b5ea571461119a578063c3cda520146111ff5761025c565b8063782d6fe111610108578063782d6fe114610e185780637af548c114610e875780637ecebe0014610eec57806387418e4a14610f5157806395d89b4114610fa857806397d63f93146110385761025c565b806364dd48f514610c6f5780636fc6407c14610c9a5780636fcfff4514610cf157806370a0823114610d6257806373f03dff14610dc75761025c565b806325240810116101dd5780634487152f116101a15780634487152f146108ea5780634bda2e2014610a2b578063555bcc4014610a42578063587cde1e14610b365780635c19a95c14610bc75780635c60da1b14610c185761025c565b80632524081014610717578063313ce5671461076e578063395093511461079f5780633af9e6691461081257806340c10f19146108775761025c565b806312d43a511161022457806312d43a51146105865780631362d8fb146105dd57806318160ddd1461062e57806320606b701461065957806323b872dd146106845761025c565b806306fdde03146102c05780630933c1ed14610350578063095ea7b31461049157806311d3e6c41461050457806311fd8a831461052f575b600034146102b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260348152602001806122396034913960400191505060405180910390fd5b6102bd611464565b50005b3480156102cc57600080fd5b506102d5611516565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103155780820151818401526020810190506102fa565b50505050905090810190601f1680156103425780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561035c57600080fd5b506104166004803603602081101561037357600080fd5b810190808035906020019064010000000081111561039057600080fd5b8201836020820111156103a257600080fd5b803590602001918460018302840111640100000000831117156103c457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506115b4565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561045657808201518184015260208101905061043b565b50505050905090810190601f1680156104835780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561049d57600080fd5b506104ea600480360360408110156104b457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506115e9565b604051808215151515815260200191505060405180910390f35b34801561051057600080fd5b506105196115fa565b6040518082815260200191505060405180910390f35b34801561053b57600080fd5b50610544611608565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561059257600080fd5b5061059b61162e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156105e957600080fd5b5061062c6004803603602081101561060057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611654565b005b34801561063a57600080fd5b50610643611660565b6040518082815260200191505060405180910390f35b34801561066557600080fd5b5061066e611666565b6040518082815260200191505060405180910390f35b34801561069057600080fd5b506106fd600480360360608110156106a757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611682565b604051808215151515815260200191505060405180910390f35b34801561072357600080fd5b5061072c611694565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561077a57600080fd5b506107836116ba565b604051808260ff1660ff16815260200191505060405180910390f35b3480156107ab57600080fd5b506107f8600480360360408110156107c257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506116cd565b604051808215151515815260200191505060405180910390f35b34801561081e57600080fd5b506108616004803603602081101561083557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506116de565b6040518082815260200191505060405180910390f35b34801561088357600080fd5b506108d06004803603604081101561089a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506116ee565b604051808215151515815260200191505060405180910390f35b3480156108f657600080fd5b506109b06004803603602081101561090d57600080fd5b810190808035906020019064010000000081111561092a57600080fd5b82018360208201111561093c57600080fd5b8035906020019184600183028401116401000000008311171561095e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506116ff565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156109f05780820151818401526020810190506109d5565b50505050905090810190601f168015610a1d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b348015610a3757600080fd5b50610a40611995565b005b348015610a4e57600080fd5b50610b3460048036036060811015610a6557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080351515906020019092919080359060200190640100000000811115610aae57600080fd5b820183602082011115610ac057600080fd5b80359060200191846001830284011164010000000083111715610ae257600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506119a0565b005b348015610b4257600080fd5b50610b8560048036036020811015610b5957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611cfc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610bd357600080fd5b50610c1660048036036020811015610bea57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d0c565b005b348015610c2457600080fd5b50610c2d611d18565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610c7b57600080fd5b50610c84611d3e565b6040518082815260200191505060405180910390f35b348015610ca657600080fd5b50610caf611d4c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610cfd57600080fd5b50610d4060048036036020811015610d1457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d72565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b348015610d6e57600080fd5b50610db160048036036020811015610d8557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d95565b6040518082815260200191505060405180910390f35b348015610dd357600080fd5b50610e1660048036036020811015610dea57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611da5565b005b348015610e2457600080fd5b50610e7160048036036040811015610e3b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611db1565b6040518082815260200191505060405180910390f35b348015610e9357600080fd5b50610ed660048036036060811015610eaa57600080fd5b810190808035906020019092919080359060200190929190803515159060200190929190505050611dc2565b6040518082815260200191505060405180910390f35b348015610ef857600080fd5b50610f3b60048036036020811015610f0f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611dd4565b6040518082815260200191505060405180910390f35b348015610f5d57600080fd5b50610f66611dec565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610fb457600080fd5b50610fbd611e12565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610ffd578082015181840152602081019050610fe2565b50505050905090810190601f16801561102a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561104457600080fd5b5061104d611eb0565b6040518082815260200191505060405180910390f35b34801561106f57600080fd5b506110b26004803603602081101561108657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611eb6565b005b3480156110c057600080fd5b5061110d600480360360408110156110d757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611ec2565b604051808215151515815260200191505060405180910390f35b34801561113357600080fd5b506111806004803603604081101561114a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611ed3565b604051808215151515815260200191505060405180910390f35b3480156111a657600080fd5b506111e9600480360360208110156111bd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611ee4565b6040518082815260200191505060405180910390f35b34801561120b57600080fd5b50611283600480360360c081101561122257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803560ff1690602001909291908035906020019092919080359060200190929190505050611ef4565b005b34801561129157600080fd5b5061129a611f05565b6040518082815260200191505060405180910390f35b3480156112bc57600080fd5b5061131f600480360360408110156112d357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f0b565b6040518082815260200191505060405180910390f35b34801561134157600080fd5b5061134a611f1c565b6040518082815260200191505060405180910390f35b34801561136c57600080fd5b50611375611f38565b6040518082815260200191505060405180910390f35b34801561139757600080fd5b506113ea600480360360408110156113ae57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803563ffffffff169060200190929190505050611f44565b604051808363ffffffff1663ffffffff1681526020018281526020019250505060405180910390f35b34801561141f57600080fd5b506114626004803603602081101561143657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f85565b005b60606000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600036604051808383808284378083019250505092505050600060405180830381855af49150503d80600081146114f4576040519150601f19603f3d011682016040523d82523d6000602084013e6114f9565b606091505b505090506040513d6000823e8160008114611512573d82f35b3d82fd5b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156115ac5780601f10611581576101008083540402835291602001916115ac565b820191906000526020600020905b81548152906001019060200180831161158f57829003601f168201915b505050505081565b60606115e2601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683611f91565b9050919050565b60006115f3611464565b5092915050565b6000611604612067565b5090565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61165c611464565b5050565b60075481565b60405180806121f6604391396043019050604051809103902081565b600061168c611464565b509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900460ff1681565b60006116d7611464565b5092915050565b60006116e8612067565b50919050565b60006116f8611464565b5092915050565b6060600060603073ffffffffffffffffffffffffffffffffffffffff16846040516024018080602001828103825283818151815260200191508051906020019080838360005b83811015611760578082015181840152602081019050611745565b50505050905090810190601f16801561178d5780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040527f0933c1ed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b60208310611842578051825260208201915060208101905060208303925061181f565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146118a2576040519150601f19603f3d011682016040523d82523d6000602084013e6118a7565b606091505b509150915060008214156118bc573d60208201fd5b8080602001905160208110156118d157600080fd5b81019080805160405193929190846401000000008211156118f157600080fd5b8382019150602082018581111561190757600080fd5b825186600182028301116401000000008211171561192457600080fd5b8083526020830192505050908051906020019080838360005b8381101561195857808201518184015260208101905061193d565b50505050905090810190601f1680156119855780820380516001836020036101000a031916815260200191505b5060405250505092505050919050565b61199d611464565b50565b600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611a46576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260348152602001806122a76034913960400191505060405180910390fd5b8115611ad957611ad76040516024016040516020818303038152906040527f153ab505000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506115b4565b505b6000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905083601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611c3c826040516024018080602001828103825283818151815260200191508051906020019080838360005b83811015611b88578082015181840152602081019050611b6d565b50505050905090810190601f168015611bb55780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040527f56e67728000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506115b4565b507fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a81601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150505050565b6000611d06612067565b50919050565b611d14611464565b5050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b69d3c21bcecceda100000081565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600f6020528060005260406000206000915054906101000a900463ffffffff1681565b6000611d9f612067565b50919050565b611dad611464565b5050565b6000611dbb612067565b5092915050565b6000611dcc611464565b509392505050565b60106020528060005260406000206000915090505481565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60028054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611ea85780601f10611e7d57610100808354040283529160200191611ea8565b820191906000526020600020905b815481529060010190602001808311611e8b57829003601f168201915b505050505081565b600b5481565b611ebe611464565b5050565b6000611ecc611464565b5092915050565b6000611edd611464565b5092915050565b6000611eee612067565b50919050565b611efc611464565b50505050505050565b60085481565b6000611f15612067565b5092915050565b604051808061226d603a9139603a019050604051809103902081565b670de0b6b3a764000081565b600e602052816000526040600020602052806000526040600020600091509150508060000160009054906101000a900463ffffffff16908060010154905082565b611f8d611464565b5050565b6060600060608473ffffffffffffffffffffffffffffffffffffffff16846040518082805190602001908083835b60208310611fe25780518252602082019150602081019050602083039250611fbf565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114612042576040519150601f19603f3d011682016040523d82523d6000602084013e612047565b606091505b5091509150600082141561205c573d60208201fd5b809250505092915050565b606060003073ffffffffffffffffffffffffffffffffffffffff1660003660405160240180806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505093505050506040516020818303038152906040527f0933c1ed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b60208310612170578051825260208201915060208101905060208303925061214d565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146121d0576040519150601f19603f3d011682016040523d82523d6000602084013e6121d5565b606091505b505090506040513d6000823e81600081146121f1573d60408301f35b3d82fdfe454950373132446f6d61696e28737472696e67206e616d652c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e74726163742948414d44656c656761746f723a66616c6c6261636b3a2063616e6e6f742073656e642076616c756520746f2066616c6c6261636b44656c65676174696f6e28616464726573732064656c6567617465652c75696e74323536206e6f6e63652c75696e74323536206578706972792948414d44656c656761746f723a3a5f736574496d706c656d656e746174696f6e3a2043616c6c6572206d75737420626520676f76a265627a7a72315820ae919b5d999541672e95eafd24339f45efae1682cfa6465a0259e7b08835552c64736f6c6343000511003248414d44656c656761746f723a3a5f736574496d706c656d656e746174696f6e3a2043616c6c6572206d75737420626520676f7600000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000001a784379d99db420000000000000000000000000000009b8c85029ebfd5f528cd215392e6302ce72071940000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000348414d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b48616d2068616d2068616d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x60806040526004361061025c5760003560e01c806364dd48f51161014457806398dca210116100b6578063da1fef391161007a578063da1fef3914611285578063dd62ed3e146112b0578063e7a324dc14611335578063ec342ad014611360578063f1127ed81461138b578063fa8f3455146114135761025c565b806398dca21014611063578063a457c2d7146110b4578063a9059cbb14611127578063b4b5ea571461119a578063c3cda520146111ff5761025c565b8063782d6fe111610108578063782d6fe114610e185780637af548c114610e875780637ecebe0014610eec57806387418e4a14610f5157806395d89b4114610fa857806397d63f93146110385761025c565b806364dd48f514610c6f5780636fc6407c14610c9a5780636fcfff4514610cf157806370a0823114610d6257806373f03dff14610dc75761025c565b806325240810116101dd5780634487152f116101a15780634487152f146108ea5780634bda2e2014610a2b578063555bcc4014610a42578063587cde1e14610b365780635c19a95c14610bc75780635c60da1b14610c185761025c565b80632524081014610717578063313ce5671461076e578063395093511461079f5780633af9e6691461081257806340c10f19146108775761025c565b806312d43a511161022457806312d43a51146105865780631362d8fb146105dd57806318160ddd1461062e57806320606b701461065957806323b872dd146106845761025c565b806306fdde03146102c05780630933c1ed14610350578063095ea7b31461049157806311d3e6c41461050457806311fd8a831461052f575b600034146102b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260348152602001806122396034913960400191505060405180910390fd5b6102bd611464565b50005b3480156102cc57600080fd5b506102d5611516565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103155780820151818401526020810190506102fa565b50505050905090810190601f1680156103425780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561035c57600080fd5b506104166004803603602081101561037357600080fd5b810190808035906020019064010000000081111561039057600080fd5b8201836020820111156103a257600080fd5b803590602001918460018302840111640100000000831117156103c457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506115b4565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561045657808201518184015260208101905061043b565b50505050905090810190601f1680156104835780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561049d57600080fd5b506104ea600480360360408110156104b457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506115e9565b604051808215151515815260200191505060405180910390f35b34801561051057600080fd5b506105196115fa565b6040518082815260200191505060405180910390f35b34801561053b57600080fd5b50610544611608565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561059257600080fd5b5061059b61162e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156105e957600080fd5b5061062c6004803603602081101561060057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611654565b005b34801561063a57600080fd5b50610643611660565b6040518082815260200191505060405180910390f35b34801561066557600080fd5b5061066e611666565b6040518082815260200191505060405180910390f35b34801561069057600080fd5b506106fd600480360360608110156106a757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611682565b604051808215151515815260200191505060405180910390f35b34801561072357600080fd5b5061072c611694565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561077a57600080fd5b506107836116ba565b604051808260ff1660ff16815260200191505060405180910390f35b3480156107ab57600080fd5b506107f8600480360360408110156107c257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506116cd565b604051808215151515815260200191505060405180910390f35b34801561081e57600080fd5b506108616004803603602081101561083557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506116de565b6040518082815260200191505060405180910390f35b34801561088357600080fd5b506108d06004803603604081101561089a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506116ee565b604051808215151515815260200191505060405180910390f35b3480156108f657600080fd5b506109b06004803603602081101561090d57600080fd5b810190808035906020019064010000000081111561092a57600080fd5b82018360208201111561093c57600080fd5b8035906020019184600183028401116401000000008311171561095e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506116ff565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156109f05780820151818401526020810190506109d5565b50505050905090810190601f168015610a1d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b348015610a3757600080fd5b50610a40611995565b005b348015610a4e57600080fd5b50610b3460048036036060811015610a6557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080351515906020019092919080359060200190640100000000811115610aae57600080fd5b820183602082011115610ac057600080fd5b80359060200191846001830284011164010000000083111715610ae257600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506119a0565b005b348015610b4257600080fd5b50610b8560048036036020811015610b5957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611cfc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610bd357600080fd5b50610c1660048036036020811015610bea57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d0c565b005b348015610c2457600080fd5b50610c2d611d18565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610c7b57600080fd5b50610c84611d3e565b6040518082815260200191505060405180910390f35b348015610ca657600080fd5b50610caf611d4c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610cfd57600080fd5b50610d4060048036036020811015610d1457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d72565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b348015610d6e57600080fd5b50610db160048036036020811015610d8557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d95565b6040518082815260200191505060405180910390f35b348015610dd357600080fd5b50610e1660048036036020811015610dea57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611da5565b005b348015610e2457600080fd5b50610e7160048036036040811015610e3b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611db1565b6040518082815260200191505060405180910390f35b348015610e9357600080fd5b50610ed660048036036060811015610eaa57600080fd5b810190808035906020019092919080359060200190929190803515159060200190929190505050611dc2565b6040518082815260200191505060405180910390f35b348015610ef857600080fd5b50610f3b60048036036020811015610f0f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611dd4565b6040518082815260200191505060405180910390f35b348015610f5d57600080fd5b50610f66611dec565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610fb457600080fd5b50610fbd611e12565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610ffd578082015181840152602081019050610fe2565b50505050905090810190601f16801561102a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561104457600080fd5b5061104d611eb0565b6040518082815260200191505060405180910390f35b34801561106f57600080fd5b506110b26004803603602081101561108657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611eb6565b005b3480156110c057600080fd5b5061110d600480360360408110156110d757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611ec2565b604051808215151515815260200191505060405180910390f35b34801561113357600080fd5b506111806004803603604081101561114a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611ed3565b604051808215151515815260200191505060405180910390f35b3480156111a657600080fd5b506111e9600480360360208110156111bd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611ee4565b6040518082815260200191505060405180910390f35b34801561120b57600080fd5b50611283600480360360c081101561122257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803560ff1690602001909291908035906020019092919080359060200190929190505050611ef4565b005b34801561129157600080fd5b5061129a611f05565b6040518082815260200191505060405180910390f35b3480156112bc57600080fd5b5061131f600480360360408110156112d357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f0b565b6040518082815260200191505060405180910390f35b34801561134157600080fd5b5061134a611f1c565b6040518082815260200191505060405180910390f35b34801561136c57600080fd5b50611375611f38565b6040518082815260200191505060405180910390f35b34801561139757600080fd5b506113ea600480360360408110156113ae57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803563ffffffff169060200190929190505050611f44565b604051808363ffffffff1663ffffffff1681526020018281526020019250505060405180910390f35b34801561141f57600080fd5b506114626004803603602081101561143657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f85565b005b60606000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600036604051808383808284378083019250505092505050600060405180830381855af49150503d80600081146114f4576040519150601f19603f3d011682016040523d82523d6000602084013e6114f9565b606091505b505090506040513d6000823e8160008114611512573d82f35b3d82fd5b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156115ac5780601f10611581576101008083540402835291602001916115ac565b820191906000526020600020905b81548152906001019060200180831161158f57829003601f168201915b505050505081565b60606115e2601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683611f91565b9050919050565b60006115f3611464565b5092915050565b6000611604612067565b5090565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61165c611464565b5050565b60075481565b60405180806121f6604391396043019050604051809103902081565b600061168c611464565b509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900460ff1681565b60006116d7611464565b5092915050565b60006116e8612067565b50919050565b60006116f8611464565b5092915050565b6060600060603073ffffffffffffffffffffffffffffffffffffffff16846040516024018080602001828103825283818151815260200191508051906020019080838360005b83811015611760578082015181840152602081019050611745565b50505050905090810190601f16801561178d5780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040527f0933c1ed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b60208310611842578051825260208201915060208101905060208303925061181f565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146118a2576040519150601f19603f3d011682016040523d82523d6000602084013e6118a7565b606091505b509150915060008214156118bc573d60208201fd5b8080602001905160208110156118d157600080fd5b81019080805160405193929190846401000000008211156118f157600080fd5b8382019150602082018581111561190757600080fd5b825186600182028301116401000000008211171561192457600080fd5b8083526020830192505050908051906020019080838360005b8381101561195857808201518184015260208101905061193d565b50505050905090810190601f1680156119855780820380516001836020036101000a031916815260200191505b5060405250505092505050919050565b61199d611464565b50565b600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611a46576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260348152602001806122a76034913960400191505060405180910390fd5b8115611ad957611ad76040516024016040516020818303038152906040527f153ab505000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506115b4565b505b6000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905083601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611c3c826040516024018080602001828103825283818151815260200191508051906020019080838360005b83811015611b88578082015181840152602081019050611b6d565b50505050905090810190601f168015611bb55780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040527f56e67728000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506115b4565b507fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a81601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150505050565b6000611d06612067565b50919050565b611d14611464565b5050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b69d3c21bcecceda100000081565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600f6020528060005260406000206000915054906101000a900463ffffffff1681565b6000611d9f612067565b50919050565b611dad611464565b5050565b6000611dbb612067565b5092915050565b6000611dcc611464565b509392505050565b60106020528060005260406000206000915090505481565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60028054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611ea85780601f10611e7d57610100808354040283529160200191611ea8565b820191906000526020600020905b815481529060010190602001808311611e8b57829003601f168201915b505050505081565b600b5481565b611ebe611464565b5050565b6000611ecc611464565b5092915050565b6000611edd611464565b5092915050565b6000611eee612067565b50919050565b611efc611464565b50505050505050565b60085481565b6000611f15612067565b5092915050565b604051808061226d603a9139603a019050604051809103902081565b670de0b6b3a764000081565b600e602052816000526040600020602052806000526040600020600091509150508060000160009054906101000a900463ffffffff16908060010154905082565b611f8d611464565b5050565b6060600060608473ffffffffffffffffffffffffffffffffffffffff16846040518082805190602001908083835b60208310611fe25780518252602082019150602081019050602083039250611fbf565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114612042576040519150601f19603f3d011682016040523d82523d6000602084013e612047565b606091505b5091509150600082141561205c573d60208201fd5b809250505092915050565b606060003073ffffffffffffffffffffffffffffffffffffffff1660003660405160240180806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505093505050506040516020818303038152906040527f0933c1ed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b60208310612170578051825260208201915060208101905060208303925061214d565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146121d0576040519150601f19603f3d011682016040523d82523d6000602084013e6121d5565b606091505b505090506040513d6000823e81600081146121f1573d60408301f35b3d82fdfe454950373132446f6d61696e28737472696e67206e616d652c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e74726163742948414d44656c656761746f723a66616c6c6261636b3a2063616e6e6f742073656e642076616c756520746f2066616c6c6261636b44656c65676174696f6e28616464726573732064656c6567617465652c75696e74323536206e6f6e63652c75696e74323536206578706972792948414d44656c656761746f723a3a5f736574496d706c656d656e746174696f6e3a2043616c6c6572206d75737420626520676f76a265627a7a72315820ae919b5d999541672e95eafd24339f45efae1682cfa6465a0259e7b08835552c64736f6c63430005110032
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000001a784379d99db420000000000000000000000000000009b8c85029ebfd5f528cd215392e6302ce72071940000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000348414d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b48616d2068616d2068616d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : name_ (string): HAM
Arg [1] : symbol_ (string): Ham ham ham
Arg [2] : decimals_ (uint8): 18
Arg [3] : initSupply_ (uint256): 2000000000000000000000000
Arg [4] : implementation_ (address): 0x9b8C85029EBFD5F528CD215392e6302ce7207194
Arg [5] : becomeImplementationData (bytes): 0x
-----Encoded View---------------
11 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000012
Arg [3] : 00000000000000000000000000000000000000000001a784379d99db42000000
Arg [4] : 0000000000000000000000009b8c85029ebfd5f528cd215392e6302ce7207194
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [7] : 48414d0000000000000000000000000000000000000000000000000000000000
Arg [8] : 000000000000000000000000000000000000000000000000000000000000000b
Arg [9] : 48616d2068616d2068616d000000000000000000000000000000000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000000
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.