ETH Price: $3,328.54 (-3.84%)

Token

1INCH Token (Staked) (st1INCH)
 

Overview

Max Total Supply

5,831,483.077108646250872848 st1INCH

Holders

3,451

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Balance
1,014.144798127881440537 st1INCH

Value
$0.00
0x02Bf6C27F51af365DBbD5A7FDc544883B95e6af9
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
GovernanceMothership

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 10000 runs

Other Settings:
default evmVersion
File 1 of 8 : GovernanceMothership.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/EnumerableSet.sol";
import "../interfaces/IGovernanceModule.sol";
import "../utils/BalanceAccounting.sol";


contract GovernanceMothership is Ownable, BalanceAccounting {
    using SafeMath for uint256;
    using EnumerableSet for EnumerableSet.AddressSet;

    event Transfer(address indexed from, address indexed to, uint256 value);
    event AddModule(address indexed module);
    event RemoveModule(address indexed module);

    IERC20 public immutable inchToken;

    EnumerableSet.AddressSet private _modules;

    constructor(IERC20 _inchToken) public {
        inchToken = _inchToken;
    }

    function name() external pure returns(string memory) {
        return "1INCH Token (Staked)";
    }

    function symbol() external pure returns(string memory) {
        return "st1INCH";
    }

    function decimals() external pure returns(uint8) {
        return 18;
    }

    function stake(uint256 amount) external {
        require(amount > 0, "Empty stake is not allowed");

        inchToken.transferFrom(msg.sender, address(this), amount);
        _mint(msg.sender, amount);
        _notifyFor(msg.sender, balanceOf(msg.sender));
        emit Transfer(address(0), msg.sender, amount);
    }

    function unstake(uint256 amount) external {
        require(amount > 0, "Empty unstake is not allowed");

        _burn(msg.sender, amount);
        _notifyFor(msg.sender, balanceOf(msg.sender));
        inchToken.transfer(msg.sender, amount);
        emit Transfer(msg.sender, address(0), amount);
    }

    function notify() external {
        _notifyFor(msg.sender, balanceOf(msg.sender));
    }

    function notifyFor(address account) external {
        _notifyFor(account, balanceOf(account));
    }

    function batchNotifyFor(address[] memory accounts) external {
        uint256 modulesLength = _modules.length();
        uint256[] memory balances = new uint256[](accounts.length);
        for (uint256 j = 0; j < accounts.length; ++j) {
            balances[j] = balanceOf(accounts[j]);
        }
        for (uint256 i = 0; i < modulesLength; ++i) {
            IGovernanceModule(_modules.at(i)).notifyStakesChanged(accounts, balances);
        }
    }

    function addModule(address module) external onlyOwner {
        require(_modules.add(module), "Module already registered");
        emit AddModule(module);
    }

    function removeModule(address module) external onlyOwner {
        require(_modules.remove(module), "Module was not registered");
        emit RemoveModule(module);
    }

    function _notifyFor(address account, uint256 balance) private {
        bytes32[] memory cached = _modules._inner._values;
        for (uint256 i = 0; i < cached.length; ++i) {
            IGovernanceModule(address(uint256(cached[i]))).notifyStakeChanged(account, balance);
        }
    }
}

File 2 of 8 : IGovernanceModule.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;


interface IGovernanceModule {
    function notifyStakeChanged(address account, uint256 newBalance) external;
    function notifyStakesChanged(address[] calldata accounts, uint256[] calldata newBalances) external;
}

File 3 of 8 : BalanceAccounting.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

import "@openzeppelin/contracts/math/SafeMath.sol";


contract BalanceAccounting {
    using SafeMath for uint256;

    uint256 private _totalSupply;
    mapping(address => uint256) private _balances;

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

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

    function _mint(address account, uint256 amount) internal virtual {
        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
    }

    function _burn(address account, uint256 amount) internal virtual {
        _balances[account] = _balances[account].sub(amount, "Burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
    }

    function _set(address account, uint256 amount) internal virtual returns(uint256 oldAmount) {
        oldAmount = _balances[account];
        if (oldAmount != amount) {
            _balances[account] = amount;
            _totalSupply = _totalSupply.add(amount).sub(oldAmount);
        }
    }
}

File 4 of 8 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 5 of 8 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

import "../GSN/Context.sol";
/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(_owner == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 6 of 8 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, 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;
    }
}

File 7 of 8 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 8 of 8 : EnumerableSet.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.0.0, only sets of type `address` (`AddressSet`) and `uint256`
 * (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;

        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping (bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) { // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.

            bytes32 lastvalue = set._values[lastIndex];

            // Move the last value to the index where the value to delete is
            set._values[toDeleteIndex] = lastvalue;
            // Update the index for the moved value
            set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        require(set._values.length > index, "EnumerableSet: index out of bounds");
        return set._values[index];
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(value)));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(value)));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(value)));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint256(_at(set._inner, index)));
    }


    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_inchToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"module","type":"address"}],"name":"AddModule","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"module","type":"address"}],"name":"RemoveModule","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"module","type":"address"}],"name":"addModule","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"}],"name":"batchNotifyFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"inchToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"notify","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"notifyFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"module","type":"address"}],"name":"removeModule","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a060405234801561001057600080fd5b5060405161148a38038061148a8339818101604052602081101561003357600080fd5b5051600061003f61009e565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060601b6001600160601b0319166080526100a2565b3390565b60805160601c6113c16100c96000398061060b5280610ba05280610c6952506113c16000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063715018a611610097578063a063246111610066578063a06324611461035e578063a694fc3a14610391578063ec954594146103ae578063f2fde38b146103b657610100565b8063715018a614610315578063899f58981461031d5780638da5cb5b1461032557806395d89b411461035657610100565b80632e17de78116100d35780632e17de7814610204578063313ce567146102215780635cf1cd2b1461023f57806370a08231146102e257610100565b806306fdde0314610105578063132b4fc81461018257806318160ddd146101b75780631ed86f19146101d1575b600080fd5b61010d6103e9565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561014757818101518382015260200161012f565b50505050905090810190601f1680156101745780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101b56004803603602081101561019857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610420565b005b6101bf610435565b60408051918252519081900360200190f35b6101b5600480360360208110156101e757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661043b565b6101b56004803603602081101561021a57600080fd5b5035610552565b6102296106ba565b6040805160ff9092168252519081900360200190f35b6101b56004803603602081101561025557600080fd5b81019060208101813564010000000081111561027057600080fd5b82018360208201111561028257600080fd5b803590602001918460208302840111640100000000831117156102a457600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506106bf945050505050565b6101bf600480360360208110156102f857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610871565b6101b5610899565b6101b561097f565b61032d61098e565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61010d6109aa565b6101b56004803603602081101561037457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166109e1565b6101b5600480360360208110156103a757600080fd5b5035610af8565b61032d610c67565b6101b5600480360360208110156103cc57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610c8b565b60408051808201909152601481527f31494e434820546f6b656e20285374616b656429000000000000000000000000602082015290565b6104328161042d83610871565b610de1565b50565b60015490565b610443610eeb565b60005473ffffffffffffffffffffffffffffffffffffffff9081169116146104b2576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6104bd600382610eef565b61050e576040805162461bcd60e51b815260206004820152601960248201527f4d6f64756c6520616c7265616479207265676973746572656400000000000000604482015290519081900360640190fd5b60405173ffffffffffffffffffffffffffffffffffffffff8216907f0e8ab0265c955b9584b70d255e316c63717f1fb52ba0acfff63bca74ca2e8fad90600090a250565b600081116105a7576040805162461bcd60e51b815260206004820152601c60248201527f456d70747920756e7374616b65206973206e6f7420616c6c6f77656400000000604482015290519081900360640190fd5b6105b13382610f1a565b6105be3361042d33610871565b604080517fa9059cbb00000000000000000000000000000000000000000000000000000000815233600482015260248101839052905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169163a9059cbb9160448083019260209291908290030181600087803b15801561065357600080fd5b505af1158015610667573d6000803e3d6000fd5b505050506040513d602081101561067d57600080fd5b505060408051828152905160009133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350565b601290565b60006106cb6003610fbc565b90506060825167ffffffffffffffff811180156106e757600080fd5b50604051908082528060200260200182016040528015610711578160200160208202803683370190505b50905060005b835181101561075b5761073c84828151811061072f57fe5b6020026020010151610871565b82828151811061074857fe5b6020908102919091010152600101610717565b5060005b8281101561086b57610772600382610fc7565b73ffffffffffffffffffffffffffffffffffffffff1663ad33334885846040518363ffffffff1660e01b8152600401808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156107e25781810151838201526020016107ca565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015610821578181015183820152602001610809565b50505050905001945050505050600060405180830381600087803b15801561084857600080fd5b505af115801561085c573d6000803e3d6000fd5b5050505080600101905061075f565b50505050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b6108a1610eeb565b60005473ffffffffffffffffffffffffffffffffffffffff908116911614610910576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b61098c3361042d33610871565b565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60408051808201909152600781527f737431494e434800000000000000000000000000000000000000000000000000602082015290565b6109e9610eeb565b60005473ffffffffffffffffffffffffffffffffffffffff908116911614610a58576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610a63600382610fd3565b610ab4576040805162461bcd60e51b815260206004820152601960248201527f4d6f64756c6520776173206e6f74207265676973746572656400000000000000604482015290519081900360640190fd5b60405173ffffffffffffffffffffffffffffffffffffffff8216907f75f4e5771d2cdd015405ae76feb37f5792736e71ff18f8a9dd690772a48111a390600090a250565b60008111610b4d576040805162461bcd60e51b815260206004820152601a60248201527f456d707479207374616b65206973206e6f7420616c6c6f776564000000000000604482015290519081900360640190fd5b604080517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101839052905173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016916323b872dd9160648083019260209291908290030181600087803b158015610be857600080fd5b505af1158015610bfc573d6000803e3d6000fd5b505050506040513d6020811015610c1257600080fd5b50610c1f90503382610ff5565b610c2c3361042d33610871565b60408051828152905133916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350565b7f000000000000000000000000000000000000000000000000000000000000000081565b610c93610eeb565b60005473ffffffffffffffffffffffffffffffffffffffff908116911614610d02576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116610d545760405162461bcd60e51b81526004018080602001828103825260268152602001806113666026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600380546040805160208084028201810190925282815260609390929091830182828015610e2e57602002820191906000526020600020905b815481526020019060010190808311610e1a575b5050505050905060005b815181101561086b57818181518110610e4d57fe5b602002602001015160001c73ffffffffffffffffffffffffffffffffffffffff166327a2743385856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b158015610ec857600080fd5b505af1158015610edc573d6000803e3d6000fd5b50505050806001019050610e38565b3390565b6000610f118373ffffffffffffffffffffffffffffffffffffffff8416611062565b90505b92915050565b604080518082018252601b81527f4275726e20616d6f756e7420657863656564732062616c616e6365000000000060208083019190915273ffffffffffffffffffffffffffffffffffffffff8516600090815260029091529190912054610f829183906110ac565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260026020526040902055600154610fb59082611143565b6001555050565b6000610f1482611185565b6000610f118383611189565b6000610f118373ffffffffffffffffffffffffffffffffffffffff84166111ed565b60015461100290826112d1565b60015573ffffffffffffffffffffffffffffffffffffffff821660009081526002602052604090205461103590826112d1565b73ffffffffffffffffffffffffffffffffffffffff90921660009081526002602052604090209190915550565b600061106e838361132b565b6110a457508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610f14565b506000610f14565b6000818484111561113b5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156111005781810151838201526020016110e8565b50505050905090810190601f16801561112d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000610f1183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506110ac565b5490565b815460009082106111cb5760405162461bcd60e51b81526004018080602001828103825260228152602001806113446022913960400191505060405180910390fd5b8260000182815481106111da57fe5b9060005260206000200154905092915050565b600081815260018301602052604081205480156112c75783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808301919081019060009087908390811061123e57fe5b906000526020600020015490508087600001848154811061125b57fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061128b57fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610f14565b6000915050610f14565b600082820183811015610f11576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000908152600191909101602052604090205415159056fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a2646970667358221220bdfeb4e03b504f7531f4808d969f07286e64513308c3bafde4dd3db25152b08464736f6c634300060c0033000000000000000000000000111111111117dc0aa78b770fa6a738034120c302

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063715018a611610097578063a063246111610066578063a06324611461035e578063a694fc3a14610391578063ec954594146103ae578063f2fde38b146103b657610100565b8063715018a614610315578063899f58981461031d5780638da5cb5b1461032557806395d89b411461035657610100565b80632e17de78116100d35780632e17de7814610204578063313ce567146102215780635cf1cd2b1461023f57806370a08231146102e257610100565b806306fdde0314610105578063132b4fc81461018257806318160ddd146101b75780631ed86f19146101d1575b600080fd5b61010d6103e9565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561014757818101518382015260200161012f565b50505050905090810190601f1680156101745780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101b56004803603602081101561019857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610420565b005b6101bf610435565b60408051918252519081900360200190f35b6101b5600480360360208110156101e757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661043b565b6101b56004803603602081101561021a57600080fd5b5035610552565b6102296106ba565b6040805160ff9092168252519081900360200190f35b6101b56004803603602081101561025557600080fd5b81019060208101813564010000000081111561027057600080fd5b82018360208201111561028257600080fd5b803590602001918460208302840111640100000000831117156102a457600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506106bf945050505050565b6101bf600480360360208110156102f857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610871565b6101b5610899565b6101b561097f565b61032d61098e565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61010d6109aa565b6101b56004803603602081101561037457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166109e1565b6101b5600480360360208110156103a757600080fd5b5035610af8565b61032d610c67565b6101b5600480360360208110156103cc57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610c8b565b60408051808201909152601481527f31494e434820546f6b656e20285374616b656429000000000000000000000000602082015290565b6104328161042d83610871565b610de1565b50565b60015490565b610443610eeb565b60005473ffffffffffffffffffffffffffffffffffffffff9081169116146104b2576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6104bd600382610eef565b61050e576040805162461bcd60e51b815260206004820152601960248201527f4d6f64756c6520616c7265616479207265676973746572656400000000000000604482015290519081900360640190fd5b60405173ffffffffffffffffffffffffffffffffffffffff8216907f0e8ab0265c955b9584b70d255e316c63717f1fb52ba0acfff63bca74ca2e8fad90600090a250565b600081116105a7576040805162461bcd60e51b815260206004820152601c60248201527f456d70747920756e7374616b65206973206e6f7420616c6c6f77656400000000604482015290519081900360640190fd5b6105b13382610f1a565b6105be3361042d33610871565b604080517fa9059cbb00000000000000000000000000000000000000000000000000000000815233600482015260248101839052905173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000111111111117dc0aa78b770fa6a738034120c302169163a9059cbb9160448083019260209291908290030181600087803b15801561065357600080fd5b505af1158015610667573d6000803e3d6000fd5b505050506040513d602081101561067d57600080fd5b505060408051828152905160009133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350565b601290565b60006106cb6003610fbc565b90506060825167ffffffffffffffff811180156106e757600080fd5b50604051908082528060200260200182016040528015610711578160200160208202803683370190505b50905060005b835181101561075b5761073c84828151811061072f57fe5b6020026020010151610871565b82828151811061074857fe5b6020908102919091010152600101610717565b5060005b8281101561086b57610772600382610fc7565b73ffffffffffffffffffffffffffffffffffffffff1663ad33334885846040518363ffffffff1660e01b8152600401808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156107e25781810151838201526020016107ca565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015610821578181015183820152602001610809565b50505050905001945050505050600060405180830381600087803b15801561084857600080fd5b505af115801561085c573d6000803e3d6000fd5b5050505080600101905061075f565b50505050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b6108a1610eeb565b60005473ffffffffffffffffffffffffffffffffffffffff908116911614610910576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b61098c3361042d33610871565b565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60408051808201909152600781527f737431494e434800000000000000000000000000000000000000000000000000602082015290565b6109e9610eeb565b60005473ffffffffffffffffffffffffffffffffffffffff908116911614610a58576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610a63600382610fd3565b610ab4576040805162461bcd60e51b815260206004820152601960248201527f4d6f64756c6520776173206e6f74207265676973746572656400000000000000604482015290519081900360640190fd5b60405173ffffffffffffffffffffffffffffffffffffffff8216907f75f4e5771d2cdd015405ae76feb37f5792736e71ff18f8a9dd690772a48111a390600090a250565b60008111610b4d576040805162461bcd60e51b815260206004820152601a60248201527f456d707479207374616b65206973206e6f7420616c6c6f776564000000000000604482015290519081900360640190fd5b604080517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101839052905173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000111111111117dc0aa78b770fa6a738034120c30216916323b872dd9160648083019260209291908290030181600087803b158015610be857600080fd5b505af1158015610bfc573d6000803e3d6000fd5b505050506040513d6020811015610c1257600080fd5b50610c1f90503382610ff5565b610c2c3361042d33610871565b60408051828152905133916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350565b7f000000000000000000000000111111111117dc0aa78b770fa6a738034120c30281565b610c93610eeb565b60005473ffffffffffffffffffffffffffffffffffffffff908116911614610d02576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116610d545760405162461bcd60e51b81526004018080602001828103825260268152602001806113666026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600380546040805160208084028201810190925282815260609390929091830182828015610e2e57602002820191906000526020600020905b815481526020019060010190808311610e1a575b5050505050905060005b815181101561086b57818181518110610e4d57fe5b602002602001015160001c73ffffffffffffffffffffffffffffffffffffffff166327a2743385856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b158015610ec857600080fd5b505af1158015610edc573d6000803e3d6000fd5b50505050806001019050610e38565b3390565b6000610f118373ffffffffffffffffffffffffffffffffffffffff8416611062565b90505b92915050565b604080518082018252601b81527f4275726e20616d6f756e7420657863656564732062616c616e6365000000000060208083019190915273ffffffffffffffffffffffffffffffffffffffff8516600090815260029091529190912054610f829183906110ac565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260026020526040902055600154610fb59082611143565b6001555050565b6000610f1482611185565b6000610f118383611189565b6000610f118373ffffffffffffffffffffffffffffffffffffffff84166111ed565b60015461100290826112d1565b60015573ffffffffffffffffffffffffffffffffffffffff821660009081526002602052604090205461103590826112d1565b73ffffffffffffffffffffffffffffffffffffffff90921660009081526002602052604090209190915550565b600061106e838361132b565b6110a457508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610f14565b506000610f14565b6000818484111561113b5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156111005781810151838201526020016110e8565b50505050905090810190601f16801561112d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000610f1183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506110ac565b5490565b815460009082106111cb5760405162461bcd60e51b81526004018080602001828103825260228152602001806113446022913960400191505060405180910390fd5b8260000182815481106111da57fe5b9060005260206000200154905092915050565b600081815260018301602052604081205480156112c75783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808301919081019060009087908390811061123e57fe5b906000526020600020015490508087600001848154811061125b57fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061128b57fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610f14565b6000915050610f14565b600082820183811015610f11576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000908152600191909101602052604090205415159056fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a2646970667358221220bdfeb4e03b504f7531f4808d969f07286e64513308c3bafde4dd3db25152b08464736f6c634300060c0033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000111111111117dc0aa78b770fa6a738034120c302

-----Decoded View---------------
Arg [0] : _inchToken (address): 0x111111111117dC0aa78b770fA6A738034120C302

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000111111111117dc0aa78b770fa6a738034120c302


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.