Latest 2 txns

TxHash Age From To Value [TxFee]
0x7cb3984eb207215ddeecd50f4ea241dd9697ab896994bf3b46a09c5d058f1aab28 days 19 hrs ago0x002ba2351532a741043d874bd0b12aab21abc289  IN   0x0dd9fa321195d3d9dfec4ed1de27e2a29f48f0d00 Ether0.002138382
0x45935e7b7af14d21b739bd5b39ce133c9d5f268bb0eab510b20e660c93b9f51228 days 20 hrs ago0x002ba2351532a741043d874bd0b12aab21abc289  IN    Contract Creation0 Ether0.012186306


[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 19 Internal Transactions

ParentTxHash Block Age From To Value
0x7cb3984eb207215ddeecd50f4ea241dd9697ab896994bf3b46a09c5d058f1aab486343928 days 19 hrs ago0x0dd9fa321195d3d9dfec4ed1de27e2a29f48f0d00x63f0c0eac9650b60e51e9f8590877897e77666c10 Ether
0x7cb3984eb207215ddeecd50f4ea241dd9697ab896994bf3b46a09c5d058f1aab486343928 days 19 hrs ago0x0dd9fa321195d3d9dfec4ed1de27e2a29f48f0d00x6fa8590920c5966713b1a86916f7b0419411e4740 Ether
0x7cb3984eb207215ddeecd50f4ea241dd9697ab896994bf3b46a09c5d058f1aab486343928 days 19 hrs ago0x0dd9fa321195d3d9dfec4ed1de27e2a29f48f0d00xc30e2213a51d0ace3263f57793af92326234e54f0 Ether
0x7cb3984eb207215ddeecd50f4ea241dd9697ab896994bf3b46a09c5d058f1aab486343928 days 19 hrs ago0x0dd9fa321195d3d9dfec4ed1de27e2a29f48f0d00xc30e2213a51d0ace3263f57793af92326234e54f0 Ether
0x7cb3984eb207215ddeecd50f4ea241dd9697ab896994bf3b46a09c5d058f1aab486343928 days 19 hrs ago0x0dd9fa321195d3d9dfec4ed1de27e2a29f48f0d00x4e868d1ddf940316964ea7673e21be6cbed8b30b0 Ether
0x7cb3984eb207215ddeecd50f4ea241dd9697ab896994bf3b46a09c5d058f1aab486343928 days 19 hrs ago0x0dd9fa321195d3d9dfec4ed1de27e2a29f48f0d00x4e868d1ddf940316964ea7673e21be6cbed8b30b0 Ether
0x7cb3984eb207215ddeecd50f4ea241dd9697ab896994bf3b46a09c5d058f1aab486343928 days 19 hrs ago0x0dd9fa321195d3d9dfec4ed1de27e2a29f48f0d00x63f0c0eac9650b60e51e9f8590877897e77666c10 Ether
0x7cb3984eb207215ddeecd50f4ea241dd9697ab896994bf3b46a09c5d058f1aab486343928 days 19 hrs ago0x0dd9fa321195d3d9dfec4ed1de27e2a29f48f0d00x6fa8590920c5966713b1a86916f7b0419411e4740 Ether
0x7cb3984eb207215ddeecd50f4ea241dd9697ab896994bf3b46a09c5d058f1aab486343928 days 19 hrs ago0x0dd9fa321195d3d9dfec4ed1de27e2a29f48f0d00x4e868d1ddf940316964ea7673e21be6cbed8b30b0 Ether
0x7cb3984eb207215ddeecd50f4ea241dd9697ab896994bf3b46a09c5d058f1aab486343928 days 19 hrs ago0x0dd9fa321195d3d9dfec4ed1de27e2a29f48f0d00x6fa8590920c5966713b1a86916f7b0419411e4740 Ether
0x7cb3984eb207215ddeecd50f4ea241dd9697ab896994bf3b46a09c5d058f1aab486343928 days 19 hrs ago0x0dd9fa321195d3d9dfec4ed1de27e2a29f48f0d00xc30e2213a51d0ace3263f57793af92326234e54f0 Ether
0x7cb3984eb207215ddeecd50f4ea241dd9697ab896994bf3b46a09c5d058f1aab486343928 days 19 hrs ago0x0dd9fa321195d3d9dfec4ed1de27e2a29f48f0d00x4e868d1ddf940316964ea7673e21be6cbed8b30b0 Ether
0x7cb3984eb207215ddeecd50f4ea241dd9697ab896994bf3b46a09c5d058f1aab486343928 days 19 hrs ago0x0dd9fa321195d3d9dfec4ed1de27e2a29f48f0d00xc30e2213a51d0ace3263f57793af92326234e54f0 Ether
0x7cb3984eb207215ddeecd50f4ea241dd9697ab896994bf3b46a09c5d058f1aab486343928 days 19 hrs ago0x0dd9fa321195d3d9dfec4ed1de27e2a29f48f0d00xc30e2213a51d0ace3263f57793af92326234e54f0 Ether
0x7cb3984eb207215ddeecd50f4ea241dd9697ab896994bf3b46a09c5d058f1aab486343928 days 19 hrs ago0x0dd9fa321195d3d9dfec4ed1de27e2a29f48f0d00x4e868d1ddf940316964ea7673e21be6cbed8b30b0 Ether
0x7cb3984eb207215ddeecd50f4ea241dd9697ab896994bf3b46a09c5d058f1aab486343928 days 19 hrs ago0x0dd9fa321195d3d9dfec4ed1de27e2a29f48f0d00xc30e2213a51d0ace3263f57793af92326234e54f0 Ether
0x7cb3984eb207215ddeecd50f4ea241dd9697ab896994bf3b46a09c5d058f1aab486343928 days 19 hrs ago0x0dd9fa321195d3d9dfec4ed1de27e2a29f48f0d00xc30e2213a51d0ace3263f57793af92326234e54f0 Ether
0x7cb3984eb207215ddeecd50f4ea241dd9697ab896994bf3b46a09c5d058f1aab486343928 days 19 hrs ago0x0dd9fa321195d3d9dfec4ed1de27e2a29f48f0d00x4e868d1ddf940316964ea7673e21be6cbed8b30b0 Ether
0x7cb3984eb207215ddeecd50f4ea241dd9697ab896994bf3b46a09c5d058f1aab486343928 days 19 hrs ago0x0dd9fa321195d3d9dfec4ed1de27e2a29f48f0d00x4e868d1ddf940316964ea7673e21be6cbed8b30b0 Ether
[ Download CSV Export  ] 
Contract Source Code Verified (Exact Match)
Contract Name: ProofOfPerformance
Compiler Version: v0.5.2+commit.1df8f40c
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

/*

 Copyright 2017-2019 RigoBlock, Rigo Investment Sagl.

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.

*/

pragma solidity 0.5.2;

contract Pool {
    
    address public owner;

    /*
     * CONSTANT PUBLIC FUNCTIONS
     */
    function balanceOf(address _who) external view returns (uint256);
    function totalSupply() external view returns (uint256 totaSupply);
    function getEventful() external view returns (address);
    function getData() external view returns (string memory name, string memory symbol, uint256 sellPrice, uint256 buyPrice);
    function calcSharePrice() external view returns (uint256);
    function getAdminData() external view returns (address, address feeCollector, address dragodAO, uint256 ratio, uint256 transactionFee, uint32 minPeriod);
}

contract SafeMath {

    function safeMul(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a * b;
        assert(a == 0 || c / a == b);
        return c;
    }

    function safeDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        assert(b > 0);
        uint256 c = a / b;
        assert(a == b * c + a % b);
        return c;
    }

    function safeSub(uint256 a, uint256 b) internal pure returns (uint256) {
        assert(b <= a);
        return a - b;
    }

    function safeAdd(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        assert(c>=a && c>=b);
        return c;
    }

    function max64(uint64 a, uint64 b) internal pure returns (uint64) {
        return a >= b ? a : b;
    }

    function min64(uint64 a, uint64 b) internal pure returns (uint64) {
        return a < b ? a : b;
    }

    function max256(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    function min256(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }
}

contract RigoToken {

    address public minter;
    
    function balanceOf(address _who) external view returns (uint256);
}

interface DragoRegistry {

    //EVENTS

    event Registered(string name, string symbol, uint256 id, address indexed drago, address indexed owner, address indexed group);
    event Unregistered(string indexed name, string indexed symbol, uint256 indexed id);
    event MetaChanged(uint256 indexed id, bytes32 indexed key, bytes32 value);

    /*
     * CORE FUNCTIONS
     */
    function register(address _drago, string calldata _name, string calldata _symbol, uint256 _dragoId, address _owner) external payable returns (bool);
    function unregister(uint256 _id) external;
    function setMeta(uint256 _id, bytes32 _key, bytes32 _value) external;
    function addGroup(address _group) external;
    function setFee(uint256 _fee) external;
    function updateOwner(uint256 _id) external;
    function updateOwners(uint256[] calldata _id) external;
    function upgrade(address _newAddress) external payable; //payable as there is a transfer of value, otherwise opcode might throw an error
    function setUpgraded(uint256 _version) external;
    function drain() external;

    /*
     * CONSTANT PUBLIC FUNCTIONS
     */
    function dragoCount() external view returns (uint256);
    function fromId(uint256 _id) external view returns (address drago, string memory name, string memory symbol, uint256 dragoId, address owner, address group);
    function fromAddress(address _drago) external view returns (uint256 id, string memory name, string memory symbol, uint256 dragoId, address owner, address group);
    function fromName(string calldata _name) external view returns (uint256 id, address drago, string memory symbol, uint256 dragoId, address owner, address group);
    function getNameFromAddress(address _pool) external view returns (string memory);
    function getSymbolFromAddress(address _pool) external view returns (string memory);
    function meta(uint256 _id, bytes32 _key) external view returns (bytes32);
    function getGroups() external view returns (address[] memory);
    function getFee() external view returns (uint256);
}

interface Inflation {

    /*
     * CORE FUNCTIONS
     */
    function mintInflation(address _thePool, uint256 _reward) external returns (bool);
    function setInflationFactor(address _group, uint256 _inflationFactor) external;
    function setMinimumRigo(uint256 _minimum) external;
    function setRigoblock(address _newRigoblock) external;
    function setAuthority(address _authority) external;
    function setProofOfPerformance(address _pop) external;
    function setPeriod(uint256 _newPeriod) external;

    /*
     * CONSTANT PUBLIC FUNCTIONS
     */
    function canWithdraw(address _thePool) external view returns (bool);
    function getInflationFactor(address _group) external view returns (uint256);
}

contract ReentrancyGuard {

    // Locked state of mutex
    bool private locked = false;

    /// @dev Functions with this modifer cannot be reentered. The mutex will be locked
    ///      before function execution and unlocked after.
    modifier nonReentrant() {
        // Ensure mutex is unlocked
        require(
            !locked,
            "REENTRANCY_ILLEGAL"
        );

        // Lock mutex before function call
        locked = true;

        // Perform function call
        _;

        // Unlock mutex after function call
        locked = false;
    }
}

interface ProofOfPerformanceFace {

    /*
     * CORE FUNCTIONS
     */
    function claimPop(uint256 _ofPool) external;
    function setRegistry(address _dragoRegistry) external;
    function setRigoblockDao(address _rigoblockDao) external;
    function setRatio(address _ofGroup, uint256 _ratio) external;

    /*
     * CONSTANT PUBLIC FUNCTIONS
     */
    function getPoolData(uint256 _ofPool)
        external view
        returns (
            bool active,
            address thePoolAddress,
            address thePoolGroup,
            uint256 thePoolPrice,
            uint256 thePoolSupply,
            uint256 poolValue,
            uint256 epochReward,
            uint256 ratio,
            uint256 pop
        );

    function getHwm(uint256 _ofPool) external view returns (uint256);
}

/// @title Proof of Performance - Controls parameters of inflation.
/// @author Gabriele Rigo - <[email protected]>
// solhint-disable-next-line
contract ProofOfPerformance is SafeMath, ReentrancyGuard, ProofOfPerformanceFace {

    address public RIGOTOKENADDRESS;

    address public dragoRegistry;
    address public rigoblockDao;

    mapping (uint256 => PoolPrice) poolPrice;
    mapping (address => Group) groups;

    struct PoolPrice {
        uint256 highwatermark;
    }

    struct Group {
        uint256 rewardRatio;
    }

    modifier onlyRigoblockDao() {
        require(
            msg.sender == rigoblockDao,
            "ONLY_RIGOBLOCK_DAO"
        );
        _;
    }

    constructor(
        address _rigoTokenAddress,
        address _rigoblockDao,
        address _dragoRegistry)
        public
    {
        RIGOTOKENADDRESS = _rigoTokenAddress;
        rigoblockDao = _rigoblockDao;
        dragoRegistry = _dragoRegistry;
    }

    /*
     * CORE FUNCTIONS
     */
    /// @dev Allows anyone to allocate the pop reward to pool wizards.
    /// @param _ofPool Number of pool id in registry.
    function claimPop(uint256 _ofPool)
        external
        nonReentrant
    {
        DragoRegistry registry = DragoRegistry(dragoRegistry);
        address poolAddress;
        (poolAddress, , , , , ) = registry.fromId(_ofPool);
        uint256 pop = proofOfPerformanceInternal(_ofPool);
        require(
            pop > 0,
            "POP_REWARD_IS_NULL"
        );
        (uint256 price, ) = getPoolPriceInternal(_ofPool);
        poolPrice[_ofPool].highwatermark = price;
        require(
            Inflation(getMinter()).mintInflation(poolAddress, pop),
            "MINT_INFLATION_ERROR"
        );
    }

    /// @dev Allows RigoBlock Dao to update the pools registry.
    /// @param _dragoRegistry Address of new registry.
    function setRegistry(address _dragoRegistry)
        external
        onlyRigoblockDao
    {
        dragoRegistry = _dragoRegistry;
    }

    /// @dev Allows RigoBlock Dao to update its address.
    /// @param _rigoblockDao Address of new dao.
    function setRigoblockDao(address _rigoblockDao)
        external
        onlyRigoblockDao
    {
        rigoblockDao = _rigoblockDao;
    }

    /// @dev Allows RigoBlock Dao to set the ratio between assets and performance reward for a group.
    /// @param _ofGroup Id of the pool.
    /// @param _ratio Id of the pool.
    /// @notice onlyRigoblockDao can set ratio.
    function setRatio(
        address _ofGroup,
        uint256 _ratio)
        external
        onlyRigoblockDao
    {
        require(
            _ratio <= 10000,
            "RATIO_BIGGER_THAN_10000"
        ); //(from 0 to 10000)
        groups[_ofGroup].rewardRatio = _ratio;
    }

    /*
     * CONSTANT PUBLIC FUNCTIONS
     */
    /// @dev Gets data of a pool.
    /// @param _ofPool Id of the pool.
    /// @return Bool the pool is active.
    /// @return address of the pool.
    /// @return address of the pool factory.
    /// @return price of the pool in wei.
    /// @return total supply of the pool in units.
    /// @return total value of the pool in wei.
    /// @return value of the reward factor or said pool.
    /// @return ratio of assets/performance reward (from 0 to 10000).
    /// @return value of the pop reward to be claimed in GRGs.
    function getPoolData(uint256 _ofPool)
        external
        view
        returns (
            bool active,
            address thePoolAddress,
            address thePoolGroup,
            uint256 thePoolPrice,
            uint256 thePoolSupply,
            uint256 poolValue,
            uint256 epochReward,
            uint256 ratio,
            uint256 pop
        )
    {
        active = isActiveInternal(_ofPool);
        (thePoolAddress, thePoolGroup) = addressFromIdInternal(_ofPool);
        (thePoolPrice, thePoolSupply) = getPoolPriceInternal(_ofPool);
        ( poolValue, ) = calcPoolValueInternal(_ofPool);
        epochReward = getEpochRewardInternal(_ofPool);
        ratio = getRatioInternal(_ofPool);
        pop = proofOfPerformanceInternal(_ofPool);
        return(
            active,
            thePoolAddress,
            thePoolGroup,
            thePoolPrice,
            thePoolSupply,
            poolValue,
            epochReward,
            ratio,
            pop
        );
    }

    /// @dev Returns the highwatermark of a pool.
    /// @param _ofPool Id of the pool.
    /// @return Value of the all-time-high pool nav.
    function getHwm(uint256 _ofPool)
        external
        view
        returns (uint256)
    {
        return poolPrice[_ofPool].highwatermark;
    }
    
    /// @dev Returns the reward factor for a pool.
    /// @param _ofPool Id of the pool.
    /// @return Value of the reward factor.
    function getEpochReward(uint256 _ofPool)
        external
        view
        returns (uint256)
    {
        return getEpochRewardInternal(_ofPool);
    }

    /// @dev Returns the split ratio of asset and performance reward.
    /// @param _ofPool Id of the pool.
    /// @return Value of the ratio from 1 to 100.
    function getRatio(uint256 _ofPool)
        external
        view
        returns (uint256)
    {
        return getRatioInternal(_ofPool);
    }
    
    /// @dev Returns the proof of performance reward for a pool.
    /// @param _ofPool Id of the pool.
    /// @return Value of the reward in Rigo tokens.
    /// @notice epoch reward should be big enough that it.
    /// @notice can be decreased if number of funds increases.
    /// @notice should be at least 10^6 (just as pool base) to start with.
    /// @notice rigo token has 10^18 decimals.
    function proofOfPerformance(uint256 _ofPool)
        external
        view
        returns (uint256)
    {
        return proofOfPerformanceInternal(_ofPool);
    }
    
    /// @dev Checks whether a pool is registered and active.
    /// @param _ofPool Id of the pool.
    /// @return Bool the pool is active.
    function isActive(uint256 _ofPool)
        external
        view
        returns (bool)
    {
        return isActiveInternal(_ofPool);
    }

    /// @dev Returns the address and the group of a pool from its id.
    /// @param _ofPool Id of the pool.
    /// @return Address of the target pool.
    /// @return Address of the pool's group.
    function addressFromId(uint256 _ofPool)
        external
        view
        returns (
            address pool,
            address group
        )
    {
        return (addressFromIdInternal(_ofPool));
    }

    /// @dev Returns the price a pool from its id.
    /// @param _ofPool Id of the pool.
    /// @return Price of the pool in wei.
    /// @return Number of tokens of a pool (totalSupply).
    function getPoolPrice(uint256 _ofPool)
        external
        view
        returns (
            uint256 thePoolPrice,
            uint256 totalTokens
        )
    {
        return (getPoolPriceInternal(_ofPool));
    }

    /// @dev Returns the address and the group of a pool from its id.
    /// @param _ofPool Id of the pool.
    /// @return Address of the target pool.
    /// @return Address of the pool's group.
    function calcPoolValue(uint256 _ofPool)
        external
        view
        returns (
            uint256 aum,
            bool success
        )
    {
        return (calcPoolValueInternal(_ofPool));
    }

    /*
     * INTERNAL FUNCTIONS
     */
    /// @dev Returns the reward factor for a pool.
    /// @param _ofPool Id of the pool.
    /// @return Value of the reward factor.
    function getEpochRewardInternal(uint256 _ofPool)
        internal
        view
        returns (uint256)
    {
        ( , address group) = addressFromIdInternal(_ofPool);
        return Inflation(getMinter()).getInflationFactor(group);
    }

    /// @dev Returns the split ratio of asset and performance reward.
    /// @param _ofPool Id of the pool.
    /// @return Value of the ratio from 1 to 100.
    function getRatioInternal(uint256 _ofPool)
        internal
        view
        returns (uint256)
    {
        ( , address group) = addressFromIdInternal(_ofPool);
        return groups[group].rewardRatio;
    }

    /// @dev Returns the address of the Inflation contract.
    /// @return Address of the minter/inflation.
    function getMinter()
        internal
        view
        returns (address)
    {
        RigoToken token = RigoToken(RIGOTOKENADDRESS);
        return token.minter();
    }

    /// @dev Returns the proof of performance reward for a pool.
    /// @param _ofPool Id of the pool.
    /// @return Value of the reward in Rigo tokens.
    /// @notice epoch reward should be big enough that it.
    /// @notice can be decreased if number of funds increases.
    /// @notice should be at least 10^6 (just as pool base) to start with.
    /// @notice rigo token has 10^18 decimals.
    function proofOfPerformanceInternal(uint256 _ofPool)
        internal
        view
        returns (uint256)
    {
        uint256 highwatermark = 1000 ether; //initialize variable with arbitrarity high value
        if (poolPrice[_ofPool].highwatermark == 0) {
            highwatermark = 1 ether;
        } else {
            highwatermark = poolPrice[_ofPool].highwatermark;
        }
        (uint256 poolValue, ) = calcPoolValueInternal(_ofPool);
        require(
            poolValue != 0,
            "POOL_VALUE_NULL"
        );
        (uint256 newPrice, uint256 tokenSupply) = getPoolPriceInternal(_ofPool);
        require (
            newPrice >= highwatermark,
            "PRICE_LOWER_THAN_HWM"
        );

        uint256 epochReward = 0;
        (address thePoolAddress, ) = addressFromIdInternal(_ofPool);
        uint256 grgBalance = 
            RigoToken(RIGOTOKENADDRESS)
            .balanceOf(
                Pool(thePoolAddress)
                .owner()
        );
        if (grgBalance >= 1 * 10 ** 18) {
            epochReward = safeMul(getEpochRewardInternal(_ofPool), 10); // 10x reward if wizard holds 1 GRG
        } else {
            epochReward = getEpochRewardInternal(_ofPool);
        }

        uint256 rewardRatio = getRatioInternal(_ofPool);
        uint256 prevPrice = highwatermark;
        uint256 priceDiff = safeSub(newPrice, prevPrice);
        uint256 performanceReward = priceDiff * tokenSupply * epochReward * rewardRatio / 10000 ether;
        uint256 assetsReward = poolValue * epochReward * (10000 - rewardRatio) / 10000 ether;
        return (performanceReward + assetsReward);
    }

    /// @dev Checks whether a pool is registered and active.
    /// @param _ofPool Id of the pool.
    /// @return Bool the pool is active.
    function isActiveInternal(uint256 _ofPool)
        internal view
        returns (bool)
    {
        DragoRegistry registry = DragoRegistry(dragoRegistry);
        (address thePool, , , , , ) = registry.fromId(_ofPool);
        if (thePool != address(0)) {
            return true;
        }
    }

    /// @dev Returns the address and the group of a pool from its id.
    /// @param _ofPool Id of the pool.
    /// @return Address of the target pool.
    /// @return Address of the pool's group.
    function addressFromIdInternal(uint256 _ofPool)
        internal
        view
        returns (
            address pool,
            address group
        )
    {
        DragoRegistry registry = DragoRegistry(dragoRegistry);
        (pool, , , , , group) = registry.fromId(_ofPool);
        return (pool, group);
    }

    /// @dev Returns the price a pool from its id.
    /// @param _ofPool Id of the pool.
    /// @return Price of the pool in wei.
    /// @return Number of tokens of a pool (totalSupply).
    function getPoolPriceInternal(uint256 _ofPool)
        internal
        view
        returns (
            uint256 thePoolPrice,
            uint256 totalTokens
        )
    {
        (address poolAddress, ) = addressFromIdInternal(_ofPool);
        Pool pool = Pool(poolAddress);
        thePoolPrice = pool.calcSharePrice();
        totalTokens = pool.totalSupply();
    }

    /// @dev Returns the address and the group of a pool from its id.
    /// @param _ofPool Id of the pool.
    /// @return Address of the target pool.
    /// @return Address of the pool's group.
    function calcPoolValueInternal(uint256 _ofPool)
        internal
        view
        returns (
            uint256 aum,
            bool success
        )
    {
        (uint256 price, uint256 supply) = getPoolPriceInternal(_ofPool);
        return ((aum = (price * supply / 1000000)), true); //1000000 is the base (decimals)
    }
}

    Contract ABI  
[{"constant":false,"inputs":[{"name":"_ofGroup","type":"address"},{"name":"_ratio","type":"uint256"}],"name":"setRatio","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_ofPool","type":"uint256"}],"name":"getHwm","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_ofPool","type":"uint256"}],"name":"addressFromId","outputs":[{"name":"pool","type":"address"},{"name":"group","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rigoblockDao","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_ofPool","type":"uint256"}],"name":"calcPoolValue","outputs":[{"name":"aum","type":"uint256"},{"name":"success","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_ofPool","type":"uint256"}],"name":"getRatio","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_ofPool","type":"uint256"}],"name":"proofOfPerformance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_ofPool","type":"uint256"}],"name":"isActive","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_ofPool","type":"uint256"}],"name":"getPoolPrice","outputs":[{"name":"thePoolPrice","type":"uint256"},{"name":"totalTokens","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"RIGOTOKENADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_dragoRegistry","type":"address"}],"name":"setRegistry","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_rigoblockDao","type":"address"}],"name":"setRigoblockDao","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"dragoRegistry","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_ofPool","type":"uint256"}],"name":"getPoolData","outputs":[{"name":"active","type":"bool"},{"name":"thePoolAddress","type":"address"},{"name":"thePoolGroup","type":"address"},{"name":"thePoolPrice","type":"uint256"},{"name":"thePoolSupply","type":"uint256"},{"name":"poolValue","type":"uint256"},{"name":"epochReward","type":"uint256"},{"name":"ratio","type":"uint256"},{"name":"pop","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_ofPool","type":"uint256"}],"name":"getEpochReward","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_ofPool","type":"uint256"}],"name":"claimPop","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_rigoTokenAddress","type":"address"},{"name":"_rigoblockDao","type":"address"},{"name":"_dragoRegistry","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"}]

  Contract Creation Code Switch To Opcodes View
60806040526000805460ff1916905534801561001a57600080fd5b506040516060806112dc8339810180604052606081101561003a57600080fd5b508051602082015160409092015160008054600160a060020a039384166101000261010060a860020a031990911617905560028054938316600160a060020a031994851617905560018054929091169190921617905561123d8061009f6000396000f3fe608060405234801561001057600080fd5b50600436106101045760003560e060020a900480639af94f301161009b578063bb76bd291161006a578063bb76bd29146102f8578063d21c87ad14610300578063d418634a14610372578063dc5d27991461038f57610104565b80639af94f301461026e578063a6c9c443146102a4578063a91ee0dc146102ac578063b516e6e1146102d257610104565b8063427fdc0c116100d7578063427fdc0c146101cd57806346a62eaf146102035780634d749e431461022057806382afd23b1461023d57610104565b80630575204714610109578063249d912314610137578063360dafa0146101665780633edd80c3146101a9575b600080fd5b6101356004803603604081101561011f57600080fd5b50600160a060020a0381351690602001356103ac565b005b6101546004803603602081101561014d57600080fd5b5035610484565b60408051918252519081900360200190f35b6101836004803603602081101561017c57600080fd5b5035610499565b60408051600160a060020a03938416815291909216602082015281519081900390910190f35b6101b16104ae565b60408051600160a060020a039092168252519081900360200190f35b6101ea600480360360208110156101e357600080fd5b50356104bd565b6040805192835290151560208301528051918290030190f35b6101546004803603602081101561021957600080fd5b50356104c9565b6101546004803603602081101561023657600080fd5b50356104da565b61025a6004803603602081101561025357600080fd5b50356104e5565b604080519115158252519081900360200190f35b61028b6004803603602081101561028457600080fd5b50356104f0565b6040805192835260208301919091528051918290030190f35b6101b16104fc565b610135600480360360208110156102c257600080fd5b5035600160a060020a0316610510565b610135600480360360208110156102e857600080fd5b5035600160a060020a03166105a1565b6101b1610632565b61031d6004803603602081101561031657600080fd5b5035610641565b604080519915158a52600160a060020a0398891660208b015296909716888701526060880194909452608087019290925260a086015260c085015260e084015261010083019190915251908190036101200190f35b6101546004803603602081101561038857600080fd5b50356106b0565b610135600480360360208110156103a557600080fd5b50356106bb565b600254600160a060020a0316331461040e576040805160e560020a62461bcd02815260206004820152601260248201527f4f4e4c595f5249474f424c4f434b5f44414f0000000000000000000000000000604482015290519081900360640190fd5b612710811115610468576040805160e560020a62461bcd02815260206004820152601760248201527f524154494f5f4249474745525f5448414e5f3130303030000000000000000000604482015290519081900360640190fd5b600160a060020a03909116600090815260046020526040902055565b6000818152600360205260409020545b919050565b6000806104a5836109ec565b91509150915091565b600254600160a060020a031681565b6000806104a583610b40565b60006104d482610b62565b92915050565b60006104d482610b8e565b60006104d482610e2f565b6000806104a583610f98565b6000546101009004600160a060020a031681565b600254600160a060020a03163314610572576040805160e560020a62461bcd02815260206004820152601260248201527f4f4e4c595f5249474f424c4f434b5f44414f0000000000000000000000000000604482015290519081900360640190fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600254600160a060020a03163314610603576040805160e560020a62461bcd02815260206004820152601260248201527f4f4e4c595f5249474f424c4f434b5f44414f0000000000000000000000000000604482015290519081900360640190fd5b6002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600154600160a060020a031681565b60008060008060008060008060006106588a610e2f565b98506106638a6109ec565b90985096506106718a610f98565b909650945061067f8a610b40565b50935061068b8a6110a9565b92506106968a610b62565b91506106a18a610b8e565b90509193959799909294969850565b60006104d4826110a9565b60005460ff1615610716576040805160e560020a62461bcd02815260206004820152601260248201527f5245454e5452414e43595f494c4c4547414c0000000000000000000000000000604482015290519081900360640190fd5b6000805460ff19166001908117825554604080517fc277f1ac000000000000000000000000000000000000000000000000000000008152600481018590529051600160a060020a039092169291839163c277f1ac9160248083019286929190829003018186803b15801561078957600080fd5b505afa15801561079d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260c08110156107c657600080fd5b8151602083018051919392830192916401000000008111156107e757600080fd5b820160208101848111156107fa57600080fd5b815164010000000081118282018710171561081457600080fd5b5050929190602001805164010000000081111561083057600080fd5b8201602081018481111561084357600080fd5b815164010000000081118282018710171561085d57600080fd5b50959650600095506108769450889350610b8e92505050565b9050600081116108d0576040805160e560020a62461bcd02815260206004820152601260248201527f504f505f5245574152445f49535f4e554c4c0000000000000000000000000000604482015290519081900360640190fd5b60006108db85610f98565b50600086815260036020526040902081905590506108f761114b565b600160a060020a031663be5ddb9984846040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561095957600080fd5b505af115801561096d573d6000803e3d6000fd5b505050506040513d602081101561098357600080fd5b505115156109db576040805160e560020a62461bcd02815260206004820152601460248201527f4d494e545f494e464c4154494f4e5f4552524f52000000000000000000000000604482015290519081900360640190fd5b50506000805460ff19169055505050565b600154604080517fc277f1ac0000000000000000000000000000000000000000000000000000000081526004810184905290516000928392600160a060020a0390911691829163c277f1ac9160248083019287929190829003018186803b158015610a5657600080fd5b505afa158015610a6a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260c0811015610a9357600080fd5b815160208301805191939283019291640100000000811115610ab457600080fd5b82016020810184811115610ac757600080fd5b8151640100000000811182820187101715610ae157600080fd5b50509291906020018051640100000000811115610afd57600080fd5b82016020810184811115610b1057600080fd5b8151640100000000811182820187101715610b2a57600080fd5b5050506060015193965092945050505050915091565b600080600080610b4f85610f98565b620f424091020495600195509350505050565b600080610b6e836109ec565b600160a060020a0316600090815260046020526040902054949350505050565b600081815260036020526040812054683635c9adc5dea00000901515610bbd5750670de0b6b3a7640000610bce565b506000828152600360205260409020545b6000610bd984610b40565b509050801515610c33576040805160e560020a62461bcd02815260206004820152600f60248201527f504f4f4c5f56414c55455f4e554c4c0000000000000000000000000000000000604482015290519081900360640190fd5b600080610c3f86610f98565b909250905083821015610c9c576040805160e560020a62461bcd02815260206004820152601460248201527f50524943455f4c4f5745525f5448414e5f48574d000000000000000000000000604482015290519081900360640190fd5b600080610ca8886109ec565b50905060008060019054906101000a9004600160a060020a0316600160a060020a03166370a0823183600160a060020a0316638da5cb5b6040518163ffffffff1660e060020a02815260040160206040518083038186803b158015610d0c57600080fd5b505afa158015610d20573d6000803e3d6000fd5b505050506040513d6020811015610d3657600080fd5b50516040805160e060020a63ffffffff8516028152600160a060020a039092166004830152516024808301926020929190829003018186803b158015610d7b57600080fd5b505afa158015610d8f573d6000803e3d6000fd5b505050506040513d6020811015610da557600080fd5b50519050670de0b6b3a76400008110610dd257610dcb610dc48a6110a9565b600a6111d4565b9250610dde565b610ddb896110a9565b92505b6000610de98a610b62565b9050876000610df888836111ff565b69021e19e0c9bab2400000970286028302879004959098026127109290920391909102949094049290920198975050505050505050565b600154604080517fc277f1ac000000000000000000000000000000000000000000000000000000008152600481018490529051600092600160a060020a0316918391839163c277f1ac9160248083019286929190829003018186803b158015610e9757600080fd5b505afa158015610eab573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260c0811015610ed457600080fd5b815160208301805191939283019291640100000000811115610ef557600080fd5b82016020810184811115610f0857600080fd5b8151640100000000811182820187101715610f2257600080fd5b50509291906020018051640100000000811115610f3e57600080fd5b82016020810184811115610f5157600080fd5b8151640100000000811182820187101715610f6b57600080fd5b509596505050600160a060020a038516159350610f919250505057600192505050610494565b5050919050565b6000806000610fa6846109ec565b509050600081905080600160a060020a0316639489fa846040518163ffffffff1660e060020a02815260040160206040518083038186803b158015610fea57600080fd5b505afa158015610ffe573d6000803e3d6000fd5b505050506040513d602081101561101457600080fd5b5051604080517f18160ddd0000000000000000000000000000000000000000000000000000000081529051919550600160a060020a038316916318160ddd91600480820192602092909190829003018186803b15801561107357600080fd5b505afa158015611087573d6000803e3d6000fd5b505050506040513d602081101561109d57600080fd5b50519395939450505050565b6000806110b5836109ec565b9150506110c061114b565b600160a060020a031663d410e0c2826040518263ffffffff1660e060020a0281526004018082600160a060020a0316600160a060020a0316815260200191505060206040518083038186803b15801561111857600080fd5b505afa15801561112c573d6000803e3d6000fd5b505050506040513d602081101561114257600080fd5b50519392505050565b600080600060019054906101000a9004600160a060020a0316905080600160a060020a031663075461726040518163ffffffff1660e060020a02815260040160206040518083038186803b1580156111a257600080fd5b505afa1580156111b6573d6000803e3d6000fd5b505050506040513d60208110156111cc57600080fd5b505191505090565b60008282028315806111f057508284828115156111ed57fe5b04145b15156111f857fe5b9392505050565b60008282111561120b57fe5b5090039056fea165627a7a72305820e1432161953186c4f0289567f4bf29cbdd2b2e313deaba495740c48943894ee700290000000000000000000000006fa8590920c5966713b1a86916f7b0419411e474000000000000000000000000002ba2351532a741043d874bd0b12aab21abc2890000000000000000000000004e868d1ddf940316964ea7673e21be6cbed8b30b

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

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000006fa8590920c5966713b1a86916f7b0419411e474
Arg [1] : 000000000000000000000000002ba2351532a741043d874bd0b12aab21abc289
Arg [2] : 0000000000000000000000004e868d1ddf940316964ea7673e21be6cbed8b30b


   Swarm Source:
bzzr://e1432161953186c4f0289567f4bf29cbdd2b2e313deaba495740c48943894ee7

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward