Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 15 from a total of 15 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
Set Associated C... | 19704941 | 15 days ago | IN | 0 ETH | 0.00032991 | ||||
Accept Ownership | 19700852 | 16 days ago | IN | 0 ETH | 0.00016944 | ||||
Nominate New Own... | 19700775 | 16 days ago | IN | 0 ETH | 0.00028229 | ||||
Set Target Token | 19697655 | 16 days ago | IN | 0 ETH | 0.00104011 | ||||
Set Target Token | 19697654 | 16 days ago | IN | 0 ETH | 0.00104011 | ||||
Set Target Token | 19697653 | 16 days ago | IN | 0 ETH | 0.00104011 | ||||
Set Associated C... | 19697652 | 16 days ago | IN | 0 ETH | 0.00041988 | ||||
Accept Ownership | 15674118 | 581 days ago | IN | 0 ETH | 0.00019768 | ||||
Nominate New Own... | 15674038 | 581 days ago | IN | 0 ETH | 0.00037639 | ||||
Set Associated C... | 15016584 | 683 days ago | IN | 0 ETH | 0.00089976 | ||||
Set Associated C... | 14677399 | 739 days ago | IN | 0 ETH | 0.00104972 | ||||
Set Target Token | 13002517 | 1000 days ago | IN | 0 ETH | 0.0037141 | ||||
Set Target Token | 13002508 | 1000 days ago | IN | 0 ETH | 0.0045697 | ||||
Set Associated C... | 13002506 | 1000 days ago | IN | 0 ETH | 0.0023546 | ||||
0x60806040 | 13002501 | 1000 days ago | IN | Create: StakingState | 0 ETH | 0.05419825 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
StakingState
Compiler Version
v0.5.16+commit.9c3226ce
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2021-08-11 */ /* ___ _ ___ _ | .\ ___ _ _ <_> ___ | __><_>._ _ ___ ._ _ ___ ___ | _// ._>| '_>| ||___|| _> | || ' |<_> || ' |/ | '/ ._> |_| \___.|_| |_| |_| |_||_|_|<___||_|_|\_|_.\___. * PeriFinance: StakingState.sol * * Latest source (may be newer): https://github.com/perifinance/peri-finance/blob/master/contracts/StakingState.sol * Docs: Will be added in the future. * https://docs.peri.finance/contracts/source/contracts/StakingState * * Contract Dependencies: * - Owned * - State * Libraries: * - SafeDecimalMath * - SafeMath * * MIT License * =========== * * Copyright (c) 2021 PeriFinance * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE */ pragma solidity ^0.5.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) { require(b <= a, "SafeMath: subtraction overflow"); 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-solidity/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) { // Solidity only automatically asserts when dividing by 0 require(b > 0, "SafeMath: division by zero"); 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) { require(b != 0, "SafeMath: modulo by zero"); return a % b; } } // Libraries // https://docs.peri.finance/contracts/source/libraries/safedecimalmath library SafeDecimalMath { using SafeMath for uint; /* Number of decimal places in the representations. */ uint8 public constant decimals = 18; uint8 public constant highPrecisionDecimals = 27; /* The number representing 1.0. */ uint public constant UNIT = 10**uint(decimals); /* The number representing 1.0 for higher fidelity numbers. */ uint public constant PRECISE_UNIT = 10**uint(highPrecisionDecimals); uint private constant UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR = 10**uint(highPrecisionDecimals - decimals); /** * @return Provides an interface to UNIT. */ function unit() external pure returns (uint) { return UNIT; } /** * @return Provides an interface to PRECISE_UNIT. */ function preciseUnit() external pure returns (uint) { return PRECISE_UNIT; } /** * @return The result of multiplying x and y, interpreting the operands as fixed-point * decimals. * * @dev A unit factor is divided out after the product of x and y is evaluated, * so that product must be less than 2**256. As this is an integer division, * the internal division always rounds down. This helps save on gas. Rounding * is more expensive on gas. */ function multiplyDecimal(uint x, uint y) internal pure returns (uint) { /* Divide by UNIT to remove the extra factor introduced by the product. */ return x.mul(y) / UNIT; } /** * @return The result of safely multiplying x and y, interpreting the operands * as fixed-point decimals of the specified precision unit. * * @dev The operands should be in the form of a the specified unit factor which will be * divided out after the product of x and y is evaluated, so that product must be * less than 2**256. * * Unlike multiplyDecimal, this function rounds the result to the nearest increment. * Rounding is useful when you need to retain fidelity for small decimal numbers * (eg. small fractions or percentages). */ function _multiplyDecimalRound( uint x, uint y, uint precisionUnit ) private pure returns (uint) { /* Divide by UNIT to remove the extra factor introduced by the product. */ uint quotientTimesTen = x.mul(y) / (precisionUnit / 10); if (quotientTimesTen % 10 >= 5) { quotientTimesTen += 10; } return quotientTimesTen / 10; } /** * @return The result of safely multiplying x and y, interpreting the operands * as fixed-point decimals of a precise unit. * * @dev The operands should be in the precise unit factor which will be * divided out after the product of x and y is evaluated, so that product must be * less than 2**256. * * Unlike multiplyDecimal, this function rounds the result to the nearest increment. * Rounding is useful when you need to retain fidelity for small decimal numbers * (eg. small fractions or percentages). */ function multiplyDecimalRoundPrecise(uint x, uint y) internal pure returns (uint) { return _multiplyDecimalRound(x, y, PRECISE_UNIT); } /** * @return The result of safely multiplying x and y, interpreting the operands * as fixed-point decimals of a standard unit. * * @dev The operands should be in the standard unit factor which will be * divided out after the product of x and y is evaluated, so that product must be * less than 2**256. * * Unlike multiplyDecimal, this function rounds the result to the nearest increment. * Rounding is useful when you need to retain fidelity for small decimal numbers * (eg. small fractions or percentages). */ function multiplyDecimalRound(uint x, uint y) internal pure returns (uint) { return _multiplyDecimalRound(x, y, UNIT); } /** * @return The result of safely dividing x and y. The return value is a high * precision decimal. * * @dev y is divided after the product of x and the standard precision unit * is evaluated, so the product of x and UNIT must be less than 2**256. As * this is an integer division, the result is always rounded down. * This helps save on gas. Rounding is more expensive on gas. */ function divideDecimal(uint x, uint y) internal pure returns (uint) { /* Reintroduce the UNIT factor that will be divided out by y. */ return x.mul(UNIT).div(y); } /** * @return The result of safely dividing x and y. The return value is as a rounded * decimal in the precision unit specified in the parameter. * * @dev y is divided after the product of x and the specified precision unit * is evaluated, so the product of x and the specified precision unit must * be less than 2**256. The result is rounded to the nearest increment. */ function _divideDecimalRound( uint x, uint y, uint precisionUnit ) private pure returns (uint) { uint resultTimesTen = x.mul(precisionUnit * 10).div(y); if (resultTimesTen % 10 >= 5) { resultTimesTen += 10; } return resultTimesTen / 10; } /** * @return The result of safely dividing x and y. The return value is as a rounded * standard precision decimal. * * @dev y is divided after the product of x and the standard precision unit * is evaluated, so the product of x and the standard precision unit must * be less than 2**256. The result is rounded to the nearest increment. */ function divideDecimalRound(uint x, uint y) internal pure returns (uint) { return _divideDecimalRound(x, y, UNIT); } /** * @return The result of safely dividing x and y. The return value is as a rounded * high precision decimal. * * @dev y is divided after the product of x and the high precision unit * is evaluated, so the product of x and the high precision unit must * be less than 2**256. The result is rounded to the nearest increment. */ function divideDecimalRoundPrecise(uint x, uint y) internal pure returns (uint) { return _divideDecimalRound(x, y, PRECISE_UNIT); } /** * @dev Convert a standard decimal representation to a high precision one. */ function decimalToPreciseDecimal(uint i) internal pure returns (uint) { return i.mul(UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR); } /** * @dev Convert a high precision decimal to a standard decimal representation. */ function preciseDecimalToDecimal(uint i) internal pure returns (uint) { uint quotientTimesTen = i / (UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR / 10); if (quotientTimesTen % 10 >= 5) { quotientTimesTen += 10; } return quotientTimesTen / 10; } /** * @dev Round down the value with given number */ function roundDownDecimal(uint x, uint d) internal pure returns (uint) { return x.div(10**d).mul(10**d); } /** * @dev Round up the value with given number */ function roundUpDecimal(uint x, uint d) internal pure returns (uint) { uint _decimal = 10**d; if (x % _decimal > 0) { x = x.add(10**d); } return x.div(_decimal).mul(_decimal); } } // https://docs.peri.finance/contracts/source/contracts/owned contract Owned { address public owner; address public nominatedOwner; constructor(address _owner) public { require(_owner != address(0), "Owner address cannot be 0"); owner = _owner; emit OwnerChanged(address(0), _owner); } function nominateNewOwner(address _owner) external onlyOwner { nominatedOwner = _owner; emit OwnerNominated(_owner); } function acceptOwnership() external { require(msg.sender == nominatedOwner, "You must be nominated before you can accept ownership"); emit OwnerChanged(owner, nominatedOwner); owner = nominatedOwner; nominatedOwner = address(0); } modifier onlyOwner { _onlyOwner(); _; } function _onlyOwner() private view { require(msg.sender == owner, "Only the contract owner may perform this action"); } event OwnerNominated(address newOwner); event OwnerChanged(address oldOwner, address newOwner); } // Inheritance // https://docs.peri.finance/contracts/source/contracts/state contract State is Owned { // the address of the contract that can modify variables // this can only be changed by the owner of this contract address public associatedContract; constructor(address _associatedContract) internal { // This contract is abstract, and thus cannot be instantiated directly require(owner != address(0), "Owner must be set"); associatedContract = _associatedContract; emit AssociatedContractUpdated(_associatedContract); } /* ========== SETTERS ========== */ // Change the associated contract to a new address function setAssociatedContract(address _associatedContract) external onlyOwner { associatedContract = _associatedContract; emit AssociatedContractUpdated(_associatedContract); } /* ========== MODIFIERS ========== */ modifier onlyAssociatedContract { require(msg.sender == associatedContract, "Only the associated contract can perform this action"); _; } /* ========== EVENTS ========== */ event AssociatedContractUpdated(address associatedContract); } // https://docs.peri.finance/contracts/source/interfaces/ierc20 interface IERC20 { // ERC20 Optional Views function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); // Views function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); // Mutative functions function transfer(address to, uint value) external returns (bool); function approve(address spender, uint value) external returns (bool); function transferFrom( address from, address to, uint value ) external returns (bool); // Events event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); } contract StakingState is Owned, State { using SafeMath for uint; using SafeDecimalMath for uint; struct TargetToken { address tokenAddress; uint8 decimals; bool activated; } mapping(bytes32 => TargetToken) public targetTokens; mapping(bytes32 => mapping(address => uint)) public stakedAmountOf; mapping(bytes32 => uint) public totalStakedAmount; mapping(bytes32 => uint) public totalStakerCount; bytes32[] public tokenList; constructor(address _owner, address _associatedContract) public Owned(_owner) State(_associatedContract) {} /* ========== VIEWER FUNCTIONS ========== */ function tokenInstance(bytes32 _currencyKey) internal view returns (IERC20) { require(targetTokens[_currencyKey].tokenAddress != address(0), "Target address is empty"); return IERC20(targetTokens[_currencyKey].tokenAddress); } function tokenAddress(bytes32 _currencyKey) external view returns (address) { return targetTokens[_currencyKey].tokenAddress; } function tokenDecimals(bytes32 _currencyKey) external view returns (uint8) { return targetTokens[_currencyKey].decimals; } function tokenActivated(bytes32 _currencyKey) external view returns (bool) { return targetTokens[_currencyKey].activated; } function getTokenCurrencyKeys() external view returns (bytes32[] memory) { return tokenList; } /* ========== MUTATIVE FUNCTIONS ========== */ function setTargetToken( bytes32 _currencyKey, address _tokenAddress, uint8 _decimals ) external onlyOwner { require(_tokenAddress != address(0), "Address cannot be empty"); require(targetTokens[_currencyKey].tokenAddress == address(0), "Token is already registered"); if (targetTokens[_currencyKey].tokenAddress == address(0)) { tokenList.push(_currencyKey); } targetTokens[_currencyKey] = TargetToken(_tokenAddress, _decimals, true); } function setTokenActivation(bytes32 _currencyKey, bool _activate) external onlyOwner { _requireTokenRegistered(_currencyKey); targetTokens[_currencyKey].activated = _activate; } function stake( bytes32 _currencyKey, address _account, uint _amount ) external onlyAssociatedContract { _requireTokenRegistered(_currencyKey); require(targetTokens[_currencyKey].activated, "Target token is not activated"); if (stakedAmountOf[_currencyKey][_account] <= 0 && _amount > 0) { _incrementTotalStaker(_currencyKey); } stakedAmountOf[_currencyKey][_account] = stakedAmountOf[_currencyKey][_account].add(_amount); totalStakedAmount[_currencyKey] = totalStakedAmount[_currencyKey].add(_amount); emit Staking(_currencyKey, _account, _amount); } function unstake( bytes32 _currencyKey, address _account, uint _amount ) external onlyAssociatedContract { require(stakedAmountOf[_currencyKey][_account] >= _amount, "Account doesn't have enough staked amount"); require(totalStakedAmount[_currencyKey] >= _amount, "Not enough staked amount to withdraw"); if (stakedAmountOf[_currencyKey][_account].sub(_amount) == 0) { _decrementTotalStaker(_currencyKey); } stakedAmountOf[_currencyKey][_account] = stakedAmountOf[_currencyKey][_account].sub(_amount); totalStakedAmount[_currencyKey] = totalStakedAmount[_currencyKey].sub(_amount); emit Unstaking(_currencyKey, _account, _amount); } function refund( bytes32 _currencyKey, address _account, uint _amount ) external onlyAssociatedContract returns (bool) { uint decimalDiff = targetTokens[_currencyKey].decimals < 18 ? 18 - targetTokens[_currencyKey].decimals : 0; return tokenInstance(_currencyKey).transfer(_account, _amount.div(10**decimalDiff)); } /* ========== INTERNAL FUNCTIONS ========== */ function _requireTokenRegistered(bytes32 _currencyKey) internal view { require(targetTokens[_currencyKey].tokenAddress != address(0), "Target token is not registered"); } function _incrementTotalStaker(bytes32 _currencyKey) internal { totalStakerCount[_currencyKey] = totalStakerCount[_currencyKey].add(1); } function _decrementTotalStaker(bytes32 _currencyKey) internal { totalStakerCount[_currencyKey] = totalStakerCount[_currencyKey].sub(1); } /* ========== EVENTS ========== */ event Staking(bytes32 currencyKey, address account, uint amount); event Unstaking(bytes32 currencyKey, address account, uint amount); }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_associatedContract","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"associatedContract","type":"address"}],"name":"AssociatedContractUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"currencyKey","type":"bytes32"},{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staking","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"currencyKey","type":"bytes32"},{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Unstaking","type":"event"},{"constant":false,"inputs":[],"name":"acceptOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"associatedContract","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getTokenCurrencyKeys","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"_currencyKey","type":"bytes32"},{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"refund","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_associatedContract","type":"address"}],"name":"setAssociatedContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"_currencyKey","type":"bytes32"},{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"uint8","name":"_decimals","type":"uint8"}],"name":"setTargetToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"_currencyKey","type":"bytes32"},{"internalType":"bool","name":"_activate","type":"bool"}],"name":"setTokenActivation","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"_currencyKey","type":"bytes32"},{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stake","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"address","name":"","type":"address"}],"name":"stakedAmountOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"targetTokens","outputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint8","name":"decimals","type":"uint8"},{"internalType":"bool","name":"activated","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"_currencyKey","type":"bytes32"}],"name":"tokenActivated","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"_currencyKey","type":"bytes32"}],"name":"tokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"_currencyKey","type":"bytes32"}],"name":"tokenDecimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenList","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"totalStakedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"totalStakerCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"_currencyKey","type":"bytes32"},{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"unstake","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506040516113af3803806113af8339818101604052604081101561003357600080fd5b50805160209091015180826001600160a01b038116610099576040805162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f74206265203000000000000000604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b038316908117825560408051928352602083019190915280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a1506000546001600160a01b0316610143576040805162461bcd60e51b815260206004820152601160248201527013dddb995c881b5d5cdd081899481cd95d607a1b604482015290519081900360640190fd5b600280546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f73f20cff579e8a4086fa607db83867595f1b6a798e718c0bfa0b94a404128e039181900360200190a1505050611209806101a66000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c806377e15451116100ad57806397bb3ce91161007157806397bb3ce9146103c95780639d88955f146103e65780639ead72221461040b578063a98b9ff414610428578063aefc4ccb1461045a5761012c565b806377e154511461034d57806379ba50971461036a5780638547dbd9146103725780638c610c8d1461038f5780638da5cb5b146103c15761012c565b806344aedc5f116100f457806344aedc5f1461024c578063480310bb1461027f57806352f445ca146102ab57806353a47bb7146102d15780635b081237146102f55761012c565b80631627540c146101315780632c20fce21461015957806337092864146101885780633f6a1607146101d15780634020ed1414610206575b600080fd5b6101576004803603602081101561014757600080fd5b50356001600160a01b0316610462565b005b6101766004803603602081101561016f57600080fd5b50356104be565b60408051918252519081900360200190f35b6101a56004803603602081101561019e57600080fd5b50356104d0565b604080516001600160a01b03909416845260ff9092166020840152151582820152519081900360600190f35b610157600480360360608110156101e757600080fd5b5080359060208101356001600160a01b0316906040013560ff16610501565b6102386004803603606081101561021c57600080fd5b508035906001600160a01b0360208201351690604001356106a1565b604080519115158252519081900360200190f35b6102696004803603602081101561026257600080fd5b50356107e7565b6040805160ff9092168252519081900360200190f35b6101766004803603604081101561029557600080fd5b50803590602001356001600160a01b0316610803565b610157600480360360208110156102c157600080fd5b50356001600160a01b0316610820565b6102d961087c565b604080516001600160a01b039092168252519081900360200190f35b6102fd61088b565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610339578181015183820152602001610321565b505050509050019250505060405180910390f35b6101766004803603602081101561036357600080fd5b50356108e3565b6101576108f5565b6102386004803603602081101561038857600080fd5b50356109b1565b610157600480360360608110156103a557600080fd5b508035906001600160a01b0360208201351690604001356109cd565b6102d9610b9b565b6102d9600480360360208110156103df57600080fd5b5035610baa565b610157600480360360408110156103fc57600080fd5b50803590602001351515610bc5565b6101766004803603602081101561042157600080fd5b5035610c01565b6101576004803603606081101561043e57600080fd5b508035906001600160a01b036020820135169060400135610c1f565b6102d9610e2a565b61046a610e39565b600180546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b60056020526000908152604090205481565b6003602052600090815260409020546001600160a01b0381169060ff600160a01b8204811691600160a81b90041683565b610509610e39565b6001600160a01b038216610564576040805162461bcd60e51b815260206004820152601760248201527f416464726573732063616e6e6f7420626520656d707479000000000000000000604482015290519081900360640190fd5b6000838152600360205260409020546001600160a01b0316156105ce576040805162461bcd60e51b815260206004820152601b60248201527f546f6b656e20697320616c726561647920726567697374657265640000000000604482015290519081900360640190fd5b6000838152600360205260409020546001600160a01b031661062057600780546001810182556000919091527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688018390555b604080516060810182526001600160a01b03938416815260ff92831660208083019182526001838501908152600097885260039091529290952090518154955192516001600160a01b031990961694169390931760ff60a01b1916600160a01b91909216021760ff60a81b1916600160a81b92151592909202919091179055565b6002546000906001600160a01b031633146106ed5760405162461bcd60e51b815260040180806020018281038252603481526020018061117d6034913960400191505060405180910390fd5b6000848152600360205260408120546012600160a01b90910460ff1610610715576000610732565b600085815260036020526040902054600160a01b900460ff166012035b60ff16905061074085610e84565b6001600160a01b031663a9059cbb8561076386600a86900a63ffffffff610f0916565b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156107b257600080fd5b505af11580156107c6573d6000803e3d6000fd5b505050506040513d60208110156107dc57600080fd5b505195945050505050565b600090815260036020526040902054600160a01b900460ff1690565b600460209081526000928352604080842090915290825290205481565b610828610e39565b600280546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f73f20cff579e8a4086fa607db83867595f1b6a798e718c0bfa0b94a404128e039181900360200190a150565b6001546001600160a01b031681565b606060078054806020026020016040519081016040528092919081815260200182805480156108d957602002820191906000526020600020905b8154815260200190600101908083116108c5575b5050505050905090565b60066020526000908152604090205481565b6001546001600160a01b0316331461093e5760405162461bcd60e51b81526004018080602001828103825260358152602001806110f06035913960400191505060405180910390fd5b600054600154604080516001600160a01b03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b600090815260036020526040902054600160a81b900460ff1690565b6002546001600160a01b03163314610a165760405162461bcd60e51b815260040180806020018281038252603481526020018061117d6034913960400191505060405180910390fd5b610a1f83610f73565b600083815260036020526040902054600160a81b900460ff16610a89576040805162461bcd60e51b815260206004820152601d60248201527f54617267657420746f6b656e206973206e6f7420616374697661746564000000604482015290519081900360640190fd5b60008381526004602090815260408083206001600160a01b0386168452909152902054158015610ab95750600081115b15610ac757610ac783610fdf565b60008381526004602090815260408083206001600160a01b0386168452909152902054610afa908263ffffffff61101116565b60008481526004602090815260408083206001600160a01b0387168452825280832093909355858252600590522054610b39908263ffffffff61101116565b6000848152600560209081526040918290209290925580518581526001600160a01b03851692810192909252818101839052517ffba03de4f3817b65c8bbd83551b938ace8f4a72bfad6821d9b4088bd6a2079809181900360600190a1505050565b6000546001600160a01b031681565b6000908152600360205260409020546001600160a01b031690565b610bcd610e39565b610bd682610f73565b6000918252600360205260409091208054911515600160a81b0260ff60a81b19909216919091179055565b60078181548110610c0e57fe5b600091825260209091200154905081565b6002546001600160a01b03163314610c685760405162461bcd60e51b815260040180806020018281038252603481526020018061117d6034913960400191505060405180910390fd5b60008381526004602090815260408083206001600160a01b0386168452909152902054811115610cc95760405162461bcd60e51b81526004018080602001828103825260298152602001806111256029913960400191505060405180910390fd5b600083815260056020526040902054811115610d165760405162461bcd60e51b81526004018080602001828103825260248152602001806111b16024913960400191505060405180910390fd5b60008381526004602090815260408083206001600160a01b0386168452909152902054610d49908263ffffffff61107216565b610d5657610d56836110cf565b60008381526004602090815260408083206001600160a01b0386168452909152902054610d89908263ffffffff61107216565b60008481526004602090815260408083206001600160a01b0387168452825280832093909355858252600590522054610dc8908263ffffffff61107216565b6000848152600560209081526040918290209290925580518581526001600160a01b03851692810192909252818101839052517ffce1a9063ab422f6b95f8c9d5e2bee83ae07416cd5859af625809f3078f5d9589181900360600190a1505050565b6002546001600160a01b031681565b6000546001600160a01b03163314610e825760405162461bcd60e51b815260040180806020018281038252602f81526020018061114e602f913960400191505060405180910390fd5b565b6000818152600360205260408120546001600160a01b0316610eed576040805162461bcd60e51b815260206004820152601760248201527f546172676574206164647265737320697320656d707479000000000000000000604482015290519081900360640190fd5b506000908152600360205260409020546001600160a01b031690565b6000808211610f5f576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b6000828481610f6a57fe5b04949350505050565b6000818152600360205260409020546001600160a01b0316610fdc576040805162461bcd60e51b815260206004820152601e60248201527f54617267657420746f6b656e206973206e6f7420726567697374657265640000604482015290519081900360640190fd5b50565b600081815260066020526040902054610fff90600163ffffffff61101116565b60009182526006602052604090912055565b60008282018381101561106b576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6000828211156110c9576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600081815260066020526040902054610fff90600163ffffffff6110721656fe596f75206d757374206265206e6f6d696e61746564206265666f726520796f752063616e20616363657074206f776e6572736869704163636f756e7420646f65736e2774206861766520656e6f756768207374616b656420616d6f756e744f6e6c792074686520636f6e7472616374206f776e6572206d617920706572666f726d207468697320616374696f6e4f6e6c7920746865206173736f63696174656420636f6e74726163742063616e20706572666f726d207468697320616374696f6e4e6f7420656e6f756768207374616b656420616d6f756e7420746f207769746864726177a265627a7a72315820100aaf008aa329c7f76d63d587a7fe0a735be0a0efc125850752628249fd07ec64736f6c63430005100032000000000000000000000000918153d6e806df9d4d33664d1cc580416171f7200000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061012c5760003560e01c806377e15451116100ad57806397bb3ce91161007157806397bb3ce9146103c95780639d88955f146103e65780639ead72221461040b578063a98b9ff414610428578063aefc4ccb1461045a5761012c565b806377e154511461034d57806379ba50971461036a5780638547dbd9146103725780638c610c8d1461038f5780638da5cb5b146103c15761012c565b806344aedc5f116100f457806344aedc5f1461024c578063480310bb1461027f57806352f445ca146102ab57806353a47bb7146102d15780635b081237146102f55761012c565b80631627540c146101315780632c20fce21461015957806337092864146101885780633f6a1607146101d15780634020ed1414610206575b600080fd5b6101576004803603602081101561014757600080fd5b50356001600160a01b0316610462565b005b6101766004803603602081101561016f57600080fd5b50356104be565b60408051918252519081900360200190f35b6101a56004803603602081101561019e57600080fd5b50356104d0565b604080516001600160a01b03909416845260ff9092166020840152151582820152519081900360600190f35b610157600480360360608110156101e757600080fd5b5080359060208101356001600160a01b0316906040013560ff16610501565b6102386004803603606081101561021c57600080fd5b508035906001600160a01b0360208201351690604001356106a1565b604080519115158252519081900360200190f35b6102696004803603602081101561026257600080fd5b50356107e7565b6040805160ff9092168252519081900360200190f35b6101766004803603604081101561029557600080fd5b50803590602001356001600160a01b0316610803565b610157600480360360208110156102c157600080fd5b50356001600160a01b0316610820565b6102d961087c565b604080516001600160a01b039092168252519081900360200190f35b6102fd61088b565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610339578181015183820152602001610321565b505050509050019250505060405180910390f35b6101766004803603602081101561036357600080fd5b50356108e3565b6101576108f5565b6102386004803603602081101561038857600080fd5b50356109b1565b610157600480360360608110156103a557600080fd5b508035906001600160a01b0360208201351690604001356109cd565b6102d9610b9b565b6102d9600480360360208110156103df57600080fd5b5035610baa565b610157600480360360408110156103fc57600080fd5b50803590602001351515610bc5565b6101766004803603602081101561042157600080fd5b5035610c01565b6101576004803603606081101561043e57600080fd5b508035906001600160a01b036020820135169060400135610c1f565b6102d9610e2a565b61046a610e39565b600180546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b60056020526000908152604090205481565b6003602052600090815260409020546001600160a01b0381169060ff600160a01b8204811691600160a81b90041683565b610509610e39565b6001600160a01b038216610564576040805162461bcd60e51b815260206004820152601760248201527f416464726573732063616e6e6f7420626520656d707479000000000000000000604482015290519081900360640190fd5b6000838152600360205260409020546001600160a01b0316156105ce576040805162461bcd60e51b815260206004820152601b60248201527f546f6b656e20697320616c726561647920726567697374657265640000000000604482015290519081900360640190fd5b6000838152600360205260409020546001600160a01b031661062057600780546001810182556000919091527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688018390555b604080516060810182526001600160a01b03938416815260ff92831660208083019182526001838501908152600097885260039091529290952090518154955192516001600160a01b031990961694169390931760ff60a01b1916600160a01b91909216021760ff60a81b1916600160a81b92151592909202919091179055565b6002546000906001600160a01b031633146106ed5760405162461bcd60e51b815260040180806020018281038252603481526020018061117d6034913960400191505060405180910390fd5b6000848152600360205260408120546012600160a01b90910460ff1610610715576000610732565b600085815260036020526040902054600160a01b900460ff166012035b60ff16905061074085610e84565b6001600160a01b031663a9059cbb8561076386600a86900a63ffffffff610f0916565b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156107b257600080fd5b505af11580156107c6573d6000803e3d6000fd5b505050506040513d60208110156107dc57600080fd5b505195945050505050565b600090815260036020526040902054600160a01b900460ff1690565b600460209081526000928352604080842090915290825290205481565b610828610e39565b600280546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f73f20cff579e8a4086fa607db83867595f1b6a798e718c0bfa0b94a404128e039181900360200190a150565b6001546001600160a01b031681565b606060078054806020026020016040519081016040528092919081815260200182805480156108d957602002820191906000526020600020905b8154815260200190600101908083116108c5575b5050505050905090565b60066020526000908152604090205481565b6001546001600160a01b0316331461093e5760405162461bcd60e51b81526004018080602001828103825260358152602001806110f06035913960400191505060405180910390fd5b600054600154604080516001600160a01b03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b600090815260036020526040902054600160a81b900460ff1690565b6002546001600160a01b03163314610a165760405162461bcd60e51b815260040180806020018281038252603481526020018061117d6034913960400191505060405180910390fd5b610a1f83610f73565b600083815260036020526040902054600160a81b900460ff16610a89576040805162461bcd60e51b815260206004820152601d60248201527f54617267657420746f6b656e206973206e6f7420616374697661746564000000604482015290519081900360640190fd5b60008381526004602090815260408083206001600160a01b0386168452909152902054158015610ab95750600081115b15610ac757610ac783610fdf565b60008381526004602090815260408083206001600160a01b0386168452909152902054610afa908263ffffffff61101116565b60008481526004602090815260408083206001600160a01b0387168452825280832093909355858252600590522054610b39908263ffffffff61101116565b6000848152600560209081526040918290209290925580518581526001600160a01b03851692810192909252818101839052517ffba03de4f3817b65c8bbd83551b938ace8f4a72bfad6821d9b4088bd6a2079809181900360600190a1505050565b6000546001600160a01b031681565b6000908152600360205260409020546001600160a01b031690565b610bcd610e39565b610bd682610f73565b6000918252600360205260409091208054911515600160a81b0260ff60a81b19909216919091179055565b60078181548110610c0e57fe5b600091825260209091200154905081565b6002546001600160a01b03163314610c685760405162461bcd60e51b815260040180806020018281038252603481526020018061117d6034913960400191505060405180910390fd5b60008381526004602090815260408083206001600160a01b0386168452909152902054811115610cc95760405162461bcd60e51b81526004018080602001828103825260298152602001806111256029913960400191505060405180910390fd5b600083815260056020526040902054811115610d165760405162461bcd60e51b81526004018080602001828103825260248152602001806111b16024913960400191505060405180910390fd5b60008381526004602090815260408083206001600160a01b0386168452909152902054610d49908263ffffffff61107216565b610d5657610d56836110cf565b60008381526004602090815260408083206001600160a01b0386168452909152902054610d89908263ffffffff61107216565b60008481526004602090815260408083206001600160a01b0387168452825280832093909355858252600590522054610dc8908263ffffffff61107216565b6000848152600560209081526040918290209290925580518581526001600160a01b03851692810192909252818101839052517ffce1a9063ab422f6b95f8c9d5e2bee83ae07416cd5859af625809f3078f5d9589181900360600190a1505050565b6002546001600160a01b031681565b6000546001600160a01b03163314610e825760405162461bcd60e51b815260040180806020018281038252602f81526020018061114e602f913960400191505060405180910390fd5b565b6000818152600360205260408120546001600160a01b0316610eed576040805162461bcd60e51b815260206004820152601760248201527f546172676574206164647265737320697320656d707479000000000000000000604482015290519081900360640190fd5b506000908152600360205260409020546001600160a01b031690565b6000808211610f5f576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b6000828481610f6a57fe5b04949350505050565b6000818152600360205260409020546001600160a01b0316610fdc576040805162461bcd60e51b815260206004820152601e60248201527f54617267657420746f6b656e206973206e6f7420726567697374657265640000604482015290519081900360640190fd5b50565b600081815260066020526040902054610fff90600163ffffffff61101116565b60009182526006602052604090912055565b60008282018381101561106b576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6000828211156110c9576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600081815260066020526040902054610fff90600163ffffffff6110721656fe596f75206d757374206265206e6f6d696e61746564206265666f726520796f752063616e20616363657074206f776e6572736869704163636f756e7420646f65736e2774206861766520656e6f756768207374616b656420616d6f756e744f6e6c792074686520636f6e7472616374206f776e6572206d617920706572666f726d207468697320616374696f6e4f6e6c7920746865206173736f63696174656420636f6e74726163742063616e20706572666f726d207468697320616374696f6e4e6f7420656e6f756768207374616b656420616d6f756e7420746f207769746864726177a265627a7a72315820100aaf008aa329c7f76d63d587a7fe0a735be0a0efc125850752628249fd07ec64736f6c63430005100032
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000918153d6e806df9d4d33664d1cc580416171f7200000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _owner (address): 0x918153D6e806dF9d4D33664D1cC580416171f720
Arg [1] : _associatedContract (address): 0x0000000000000000000000000000000000000000
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000918153d6e806df9d4d33664d1cc580416171f720
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 25 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.