Contract 0x90E37c98874Fbd1e6aC35461cF0ABAe457Bb599d 6

 
Txn Hash Method
Block
From
To
Value
0x40adce17672c66d30c0fb99358008bafed658f7830a0b04a4d8e86310685c8dcRegister1062079062023-06-29 4:56:29237 days 16 hrs agoGYSR: Deployer IN  0x90e37c98874fbd1e6ac35461cf0abae457bb599d0 ETH0.000028842810.000000088
0x0696cacd8f290466849347dd1ab93a6754e8a0da29ecbc1133890cd04d51bb11Register1056622602023-06-16 13:48:17250 days 7 hrs agoGYSR: Deployer IN  0x90e37c98874fbd1e6ac35461cf0abae457bb599d0 ETH0.0000334921410.000000086
0xc86977958c1eb1574720ac06642deaa1ccaf85a8c04bff15eff01d5666a8b720Register1056621962023-06-16 13:46:09250 days 7 hrs agoGYSR: Deployer IN  0x90e37c98874fbd1e6ac35461cf0abae457bb599d0 ETH0.0000338696220.000000094
0x6b1cdbb543c4e3e9414077477cc6a7cd6aeaa626346f030a5e0c736891b64813Register1056620662023-06-16 13:41:49250 days 7 hrs agoGYSR: Deployer IN  0x90e37c98874fbd1e6ac35461cf0abae457bb599d0 ETH0.0000368714180.000000075
0x01310b248bd8020dbf4abe77f2de50b178a25773366ff61432a5312bac80113cRegister1056620432023-06-16 13:41:03250 days 7 hrs agoGYSR: Deployer IN  0x90e37c98874fbd1e6ac35461cf0abae457bb599d0 ETH0.0000368111470.000000077
0x560dac2f456b8b2777743357579de9fc8134a4aca741faf0a3b3b0e2a1892121Register1056620232023-06-16 13:40:23250 days 7 hrs agoGYSR: Deployer IN  0x90e37c98874fbd1e6ac35461cf0abae457bb599d0 ETH0.0000353174740.000000072
0x768bbe85a575e455dcde3921870497dee670bde083bea0dc5379b028608a668eRegister1056619112023-06-16 13:36:39250 days 7 hrs agoGYSR: Deployer IN  0x90e37c98874fbd1e6ac35461cf0abae457bb599d0 ETH0.0000329197560.000000071
0xd7d5855cd11d31e433d95f22e0a16964443f939ceece5e112a51300d6db5f160Register1056618622023-06-16 13:35:01250 days 7 hrs agoGYSR: Deployer IN  0x90e37c98874fbd1e6ac35461cf0abae457bb599d0 ETH0.0000306878570.000000073
0xf82d2230d4a787b8b9c95eb46224bd1571310312534ae08dcc69465b5b73e591Register1056618192023-06-16 13:33:35250 days 7 hrs agoGYSR: Deployer IN  0x90e37c98874fbd1e6ac35461cf0abae457bb599d0 ETH0.000031653120.000000081
0x49e117e4c2d9a36430fdba221c695126b1fd751468c171ca379375e2813113fdRegister1056616382023-06-16 13:27:33250 days 7 hrs agoGYSR: Deployer IN  0x90e37c98874fbd1e6ac35461cf0abae457bb599d0 ETH0.0000266739490.000000071
0x8d6c3efe632ae11182009d4922e3115454e2dc559481a6e0f651b5b16734a196Register1056615392023-06-16 13:24:15250 days 7 hrs agoGYSR: Deployer IN  0x90e37c98874fbd1e6ac35461cf0abae457bb599d0 ETH0.0000288241830.000000067
0x23a38f3b20548943011749c95d470fde36c1609c7ce46da1454bd431625ff319Register1056614642023-06-16 13:21:45250 days 7 hrs agoGYSR: Deployer IN  0x90e37c98874fbd1e6ac35461cf0abae457bb599d0 ETH0.0000300484320.000000071
0x5a8b7c813d3e485f4a1bf247565e9446c4409ead3099df01395e7f0182f59574Register1056613932023-06-16 13:19:23250 days 7 hrs agoGYSR: Deployer IN  0x90e37c98874fbd1e6ac35461cf0abae457bb599d0 ETH0.000028228060.000000081
0x76a2a11d0639b27ad6fd217d0754a2e230f65d63cbf959491a17527eb27f8390Register1056613492023-06-16 13:17:55250 days 7 hrs agoGYSR: Deployer IN  0x90e37c98874fbd1e6ac35461cf0abae457bb599d0 ETH0.0000276864330.000000088
0x19cb900b4d594e6c9b4845eaa39b29ed0f0962e34a4cf3ed4f68c54fa683c39d0x608060401056435592023-06-16 3:24:55250 days 17 hrs agoGYSR: Deployer IN  Create: PoolInfo0 ETH0.0006931879120.000000064
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PoolInfo

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 10000 runs

Other Settings:
default evmVersion
File 1 of 11 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

    /**
     * @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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from,
        address to,
        uint256 amount
    ) external returns (bool);
}

File 2 of 11 : PoolInfo.sol
/*
PoolInfo

https://github.com/gysr-io/core

SPDX-License-Identifier: MIT
*/

pragma solidity 0.8.18;

import "../interfaces/IPoolInfo.sol";
import "../interfaces/IPool.sol";
import "../interfaces/IStakingModule.sol";
import "../interfaces/IRewardModule.sol";
import "../interfaces/IStakingModuleInfo.sol";
import "../interfaces/IRewardModuleInfo.sol";
import "../OwnerController.sol";

/**
 * @title Pool info library
 *
 * @notice this implements the Pool info library, which provides read-only
 * convenience functions to query additional information and metadata
 * about the core Pool contract.
 */

contract PoolInfo is IPoolInfo, OwnerController {
    mapping(address => address) public registry;

    /**
     * @inheritdoc IPoolInfo
     */
    function modules(
        address pool
    ) public view override returns (address, address, address, address) {
        IPool p = IPool(pool);
        IStakingModule s = IStakingModule(p.stakingModule());
        IRewardModule r = IRewardModule(p.rewardModule());
        return (address(s), address(r), s.factory(), r.factory());
    }

    /**
     * @notice register factory to info module
     * @param factory address of factory
     * @param info address of info module contract
     */
    function register(address factory, address info) external onlyController {
        registry[factory] = info;
    }

    /**
     * @inheritdoc IPoolInfo
     */
    function rewards(
        address pool,
        address addr,
        bytes calldata stakingdata,
        bytes calldata rewarddata
    ) public view override returns (uint256[] memory rewards_) {
        address stakingModule;
        address rewardModule;
        IStakingModuleInfo stakingModuleInfo;
        IRewardModuleInfo rewardModuleInfo;
        {
            address stakingModuleType;
            address rewardModuleType;
            (
                stakingModule,
                rewardModule,
                stakingModuleType,
                rewardModuleType
            ) = modules(pool);

            stakingModuleInfo = IStakingModuleInfo(registry[stakingModuleType]);
            rewardModuleInfo = IRewardModuleInfo(registry[rewardModuleType]);
        }

        rewards_ = new uint256[](IPool(pool).rewardTokens().length);

        (bytes32[] memory accounts, uint256[] memory shares) = stakingModuleInfo
            .positions(stakingModule, addr, stakingdata);

        for (uint256 i; i < accounts.length; ++i) {
            uint256[] memory r = rewardModuleInfo.rewards(
                rewardModule,
                accounts[i],
                shares[i],
                rewarddata
            );
            for (uint256 j; j < r.length; ++j) rewards_[j] += r[j];
        }
    }
}

File 3 of 11 : IEvents.sol
/*
IEvents

https://github.com/gysr-io/core

SPDX-License-Identifier: MIT
 */

pragma solidity 0.8.18;

/**
 * @title GYSR event system
 *
 * @notice common interface to define GYSR event system
 */
interface IEvents {
    // staking
    event Staked(
        bytes32 indexed account,
        address indexed user,
        address indexed token,
        uint256 amount,
        uint256 shares
    );
    event Unstaked(
        bytes32 indexed account,
        address indexed user,
        address indexed token,
        uint256 amount,
        uint256 shares
    );
    event Claimed(
        bytes32 indexed account,
        address indexed user,
        address indexed token,
        uint256 amount,
        uint256 shares
    );
    event Updated(bytes32 indexed account, address indexed user);

    // rewards
    event RewardsDistributed(
        address indexed user,
        address indexed token,
        uint256 amount,
        uint256 shares
    );
    event RewardsFunded(
        address indexed token,
        uint256 amount,
        uint256 shares,
        uint256 timestamp
    );
    event RewardsExpired(
        address indexed token,
        uint256 amount,
        uint256 shares,
        uint256 timestamp
    );
    event RewardsWithdrawn(
        address indexed token,
        uint256 amount,
        uint256 shares,
        uint256 timestamp
    );
    event RewardsUpdated(bytes32 indexed account);

    // gysr
    event GysrSpent(address indexed user, uint256 amount);
    event GysrVested(address indexed user, uint256 amount);
    event GysrWithdrawn(uint256 amount);
    event Fee(address indexed receiver, address indexed token, uint256 amount);
}

File 4 of 11 : IOwnerController.sol
/*
IOwnerController

https://github.com/gysr-io/core

SPDX-License-Identifier: MIT
*/

pragma solidity 0.8.18;

/**
 * @title Owner controller interface
 *
 * @notice this defines the interface for any contracts that use the
 * owner controller access pattern
 */
interface IOwnerController {
    /**
     * @dev Returns the address of the current owner.
     */
    function owner() external view returns (address);

    /**
     * @dev Returns the address of the current controller.
     */
    function controller() external view returns (address);

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`). This can
     * include renouncing ownership by transferring to the zero address.
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) external;

    /**
     * @dev Transfers control of the contract to a new account (`newController`).
     * Can only be called by the owner.
     */
    function transferControl(address newController) external;
}

File 5 of 11 : IPool.sol
/*
IPool

https://github.com/gysr-io/core

SPDX-License-Identifier: MIT
*/

pragma solidity 0.8.18;

/**
 * @title Pool interface
 *
 * @notice this defines the core Pool contract interface
 */
interface IPool {
    /**
     * @return staking tokens for Pool
     */
    function stakingTokens() external view returns (address[] memory);

    /**
     * @return reward tokens for Pool
     */
    function rewardTokens() external view returns (address[] memory);

    /**
     * @return staking balances for user
     */
    function stakingBalances(
        address user
    ) external view returns (uint256[] memory);

    /**
     * @return total staking balances for Pool
     */
    function stakingTotals() external view returns (uint256[] memory);

    /**
     * @return reward balances for Pool
     */
    function rewardBalances() external view returns (uint256[] memory);

    /**
     * @return GYSR usage ratio for Pool
     */
    function usage() external view returns (uint256);

    /**
     * @return address of staking module
     */
    function stakingModule() external view returns (address);

    /**
     * @return address of reward module
     */
    function rewardModule() external view returns (address);

    /**
     * @notice stake asset and begin earning rewards
     * @param amount number of tokens to stake
     * @param stakingdata data passed to staking module
     * @param rewarddata data passed to reward module
     */
    function stake(
        uint256 amount,
        bytes calldata stakingdata,
        bytes calldata rewarddata
    ) external;

    /**
     * @notice unstake asset and claim rewards
     * @param amount number of tokens to unstake
     * @param stakingdata data passed to staking module
     * @param rewarddata data passed to reward module
     */
    function unstake(
        uint256 amount,
        bytes calldata stakingdata,
        bytes calldata rewarddata
    ) external;

    /**
     * @notice claim rewards without unstaking
     * @param amount number of tokens to claim against
     * @param stakingdata data passed to staking module
     * @param rewarddata data passed to reward module
     */
    function claim(
        uint256 amount,
        bytes calldata stakingdata,
        bytes calldata rewarddata
    ) external;

    /**
     * @notice method called ad hoc to update user accounting
     * @param stakingdata data passed to staking module
     * @param rewarddata data passed to reward module
     */
    function update(
        bytes calldata stakingdata,
        bytes calldata rewarddata
    ) external;

    /**
     * @notice method called ad hoc to clean up and perform additional accounting
     * @param stakingdata data passed to staking module
     * @param rewarddata data passed to reward module
     */
    function clean(
        bytes calldata stakingdata,
        bytes calldata rewarddata
    ) external;

    /**
     * @return gysr balance available for withdrawal
     */
    function gysrBalance() external view returns (uint256);

    /**
     * @notice withdraw GYSR tokens applied during unstaking
     * @param amount number of GYSR to withdraw
     */
    function withdraw(uint256 amount) external;

    /**
     * @notice transfer control of the staking module to another account
     * @param newController address of new controller
     */
    function transferControlStakingModule(address newController) external;

    /**
     * @notice transfer control of the reward module to another account
     * @param newController address of new controller
     */
    function transferControlRewardModule(address newController) external;

    /**
     * @notice execute multiple operations in a single call
     * @param data array of encoded function data
     */
    function multicall(
        bytes[] calldata data
    ) external returns (bytes[] memory results);
}

File 6 of 11 : IPoolInfo.sol
/*
IPoolInfo

https://github.com/gysr-io/core

SPDX-License-Identifier: MIT
*/

pragma solidity 0.8.18;

/**
 * @title Pool info interface
 *
 * @notice this defines the Pool info contract interface
 */

interface IPoolInfo {
    /**
     * @notice get information about the underlying staking and reward modules
     * @param pool address of Pool contract
     * @return staking module address
     * @return reward module address
     * @return staking module type
     * @return reward module type
     */
    function modules(
        address pool
    ) external view returns (address, address, address, address);

    /**
     * @notice get pending rewards for arbitrary Pool and user pair
     * @param pool address of Pool contract
     * @param addr address of user for preview
     * @param stakingdata additional data passed to staking module info library
     * @param rewarddata additional data passed to reward module info library
     */
    function rewards(
        address pool,
        address addr,
        bytes calldata stakingdata,
        bytes calldata rewarddata
    ) external view returns (uint256[] memory);
}

File 7 of 11 : IRewardModule.sol
/*
IRewardModule

https://github.com/gysr-io/core

SPDX-License-Identifier: MIT
*/

pragma solidity 0.8.18;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

import "./IEvents.sol";
import "./IOwnerController.sol";

/**
 * @title Reward module interface
 *
 * @notice this contract defines the common interface that any reward module
 * must implement to be compatible with the modular Pool architecture.
 */
interface IRewardModule is IOwnerController, IEvents {
    /**
     * @return array of reward tokens
     */
    function tokens() external view returns (address[] memory);

    /**
     * @return array of reward token balances
     */
    function balances() external view returns (uint256[] memory);

    /**
     * @return GYSR usage ratio for reward module
     */
    function usage() external view returns (uint256);

    /**
     * @return address of module factory
     */
    function factory() external view returns (address);

    /**
     * @notice perform any necessary accounting for new stake
     * @param account bytes32 id of staking account
     * @param sender address of sender
     * @param shares number of new shares minted
     * @param data addtional data
     * @return amount of gysr spent
     * @return amount of gysr vested
     */
    function stake(
        bytes32 account,
        address sender,
        uint256 shares,
        bytes calldata data
    ) external returns (uint256, uint256);

    /**
     * @notice reward user and perform any necessary accounting for unstake
     * @param account bytes32 id of staking account
     * @param sender address of sender
     * @param receiver address of reward receiver
     * @param shares number of shares burned
     * @param data additional data
     * @return amount of gysr spent
     * @return amount of gysr vested
     */
    function unstake(
        bytes32 account,
        address sender,
        address receiver,
        uint256 shares,
        bytes calldata data
    ) external returns (uint256, uint256);

    /**
     * @notice reward user and perform and necessary accounting for existing stake
     * @param account bytes32 id of staking account
     * @param sender address of sender
     * @param receiver address of reward receiver
     * @param shares number of shares being claimed against
     * @param data additional data
     * @return amount of gysr spent
     * @return amount of gysr vested
     */
    function claim(
        bytes32 account,
        address sender,
        address receiver,
        uint256 shares,
        bytes calldata data
    ) external returns (uint256, uint256);

    /**
     * @notice method called by anyone to update accounting
     * @dev will only be called ad hoc and should not contain essential logic
     * @param account bytes32 id of staking account for update
     * @param sender address of sender
     * @param data additional data
     */
    function update(
        bytes32 account,
        address sender,
        bytes calldata data
    ) external;

    /**
     * @notice method called by owner to clean up and perform additional accounting
     * @dev will only be called ad hoc and should not contain any essential logic
     * @param data additional data
     */
    function clean(bytes calldata data) external;
}

File 8 of 11 : IRewardModuleInfo.sol
/*
IRewardModuleInfo

https://github.com/gysr-io/core

SPDX-License-Identifier: MIT
*/

pragma solidity 0.8.18;

/**
 * @title Reward module info interface
 *
 * @notice this contract defines the common interface that any reward module info
 * must implement to be compatible with the modular Pool architecture.
 */

interface IRewardModuleInfo {
    /**
     * @notice get all token metadata
     * @param module address of reward module
     * @return addresses
     * @return names
     * @return symbols
     * @return decimals
     */
    function tokens(
        address module
    )
        external
        view
        returns (
            address[] memory,
            string[] memory,
            string[] memory,
            uint8[] memory
        );

    /**
     * @notice generic function to get pending reward balances
     * @param module address of reward module
     * @param account bytes32 account of interest for preview
     * @param shares number of shares that would be used
     * @param data additional encoded data
     * @return estimated reward balances
     */
    function rewards(
        address module,
        bytes32 account,
        uint256 shares,
        bytes calldata data
    ) external view returns (uint256[] memory);
}

File 9 of 11 : IStakingModule.sol
/*
IStakingModule

https://github.com/gysr-io/core

SPDX-License-Identifier: MIT
*/

pragma solidity 0.8.18;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

import "./IEvents.sol";
import "./IOwnerController.sol";

/**
 * @title Staking module interface
 *
 * @notice this contract defines the common interface that any staking module
 * must implement to be compatible with the modular Pool architecture.
 */
interface IStakingModule is IOwnerController, IEvents {
    /**
     * @return array of staking tokens
     */
    function tokens() external view returns (address[] memory);

    /**
     * @notice get balance of user
     * @param user address of user
     * @return balances of each staking token
     */
    function balances(address user) external view returns (uint256[] memory);

    /**
     * @return address of module factory
     */
    function factory() external view returns (address);

    /**
     * @notice get total staked amount
     * @return totals for each staking token
     */
    function totals() external view returns (uint256[] memory);

    /**
     * @notice stake an amount of tokens for user
     * @param sender address of sender
     * @param amount number of tokens to stake
     * @param data additional data
     * @return bytes32 id of staking account
     * @return number of shares minted for stake
     */
    function stake(
        address sender,
        uint256 amount,
        bytes calldata data
    ) external returns (bytes32, uint256);

    /**
     * @notice unstake an amount of tokens for user
     * @param sender address of sender
     * @param amount number of tokens to unstake
     * @param data additional data
     * @return bytes32 id of staking account
     * @return address of reward receiver
     * @return number of shares burned for unstake
     */
    function unstake(
        address sender,
        uint256 amount,
        bytes calldata data
    ) external returns (bytes32, address, uint256);

    /**
     * @notice quote the share value for an amount of tokens without unstaking
     * @param sender address of sender
     * @param amount number of tokens to claim with
     * @param data additional data
     * @return bytes32 id of staking account
     * @return address of reward receiver
     * @return number of shares that the claim amount is worth
     */
    function claim(
        address sender,
        uint256 amount,
        bytes calldata data
    ) external returns (bytes32, address, uint256);

    /**
     * @notice method called by anyone to update accounting
     * @dev will only be called ad hoc and should not contain essential logic
     * @param sender address of user for update
     * @param data additional data
     * @return bytes32 id of staking account
     */
    function update(
        address sender,
        bytes calldata data
    ) external returns (bytes32);

    /**
     * @notice method called by owner to clean up and perform additional accounting
     * @dev will only be called ad hoc and should not contain any essential logic
     * @param data additional data
     */
    function clean(bytes calldata data) external;
}

File 10 of 11 : IStakingModuleInfo.sol
/*
IStakingModuleInfo

https://github.com/gysr-io/core

SPDX-License-Identifier: MIT
*/

pragma solidity 0.8.18;

/**
 * @title Staking module info interface
 *
 * @notice this contract defines the common interface that any staking module info
 * must implement to be compatible with the modular Pool architecture.
 */
interface IStakingModuleInfo {
    /**
     * @notice convenience function to get all token metadata in a single call
     * @param module address of staking module
     * @return addresses
     * @return names
     * @return symbols
     * @return decimals
     */
    function tokens(
        address module
    )
        external
        view
        returns (
            address[] memory,
            string[] memory,
            string[] memory,
            uint8[] memory
        );

    /**
     * @notice get all staking positions for user
     * @param module address of staking module
     * @param addr user address of interest
     * @param data additional encoded data
     * @return accounts_
     * @return shares_
     */
    function positions(
        address module,
        address addr,
        bytes calldata data
    ) external view returns (bytes32[] memory, uint256[] memory);
}

File 11 of 11 : OwnerController.sol
/*
OwnerController

https://github.com/gysr-io/core

SPDX-License-Identifier: MIT
*/

pragma solidity 0.8.18;

import "./interfaces/IOwnerController.sol";

/**
 * @title Owner controller
 *
 * @notice this base contract implements an owner-controller access model.
 *
 * @dev the contract is an adapted version of the OpenZeppelin Ownable contract.
 * It allows the owner to designate an additional account as the controller to
 * perform restricted operations.
 *
 * Other changes include supporting role verification with a require method
 * in addition to the modifier option, and removing some unneeded functionality.
 *
 * Original contract here:
 * https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol
 */
contract OwnerController is IOwnerController {
    address private _owner;
    address private _controller;

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

    event ControlTransferred(
        address indexed previousController,
        address indexed newController
    );

    constructor() {
        _owner = msg.sender;
        _controller = msg.sender;
        emit OwnershipTransferred(address(0), _owner);
        emit ControlTransferred(address(0), _owner);
    }

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

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

    /**
     * @dev Modifier that throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(_owner == msg.sender, "oc1");
        _;
    }

    /**
     * @dev Modifier that throws if called by any account other than the controller.
     */
    modifier onlyController() {
        require(_controller == msg.sender, "oc2");
        _;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    function requireOwner() internal view {
        require(_owner == msg.sender, "oc1");
    }

    /**
     * @dev Throws if called by any account other than the controller.
     */
    function requireController() internal view {
        require(_controller == msg.sender, "oc2");
    }

    /**
     * @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 override {
        requireOwner();
        require(newOwner != address(0), "oc3");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }

    /**
     * @dev Transfers control of the contract to a new account (`newController`).
     * Can only be called by the owner.
     */
    function transferControl(address newController) public virtual override {
        requireOwner();
        require(newController != address(0), "oc4");
        emit ControlTransferred(_controller, newController);
        _controller = newController;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 10000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousController","type":"address"},{"indexed":true,"internalType":"address","name":"newController","type":"address"}],"name":"ControlTransferred","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"},{"inputs":[],"name":"controller","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"}],"name":"modules","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"factory","type":"address"},{"internalType":"address","name":"info","type":"address"}],"name":"register","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"registry","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"address","name":"addr","type":"address"},{"internalType":"bytes","name":"stakingdata","type":"bytes"},{"internalType":"bytes","name":"rewarddata","type":"bytes"}],"name":"rewards","outputs":[{"internalType":"uint256[]","name":"rewards_","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newController","type":"address"}],"name":"transferControl","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b5060008054336001600160a01b0319918216811783556001805490921681179091556040519091907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3600080546040516001600160a01b0390911691907fa06677f7b64342b4bcbde423684dbdb5356acfe41ad0285b6ecbe6dc4bf427f2908290a361111c806100a56000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063a8ee49fe1161005b578063a8ee49fe14610140578063aa67735414610193578063f2fde38b146101a6578063f77c4791146101b957600080fd5b8063038defd71461008d5780636d16fa41146100ed578063764a4acd146101025780638da5cb5b14610122575b600080fd5b6100c361009b366004610b32565b60026020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6101006100fb366004610b32565b6101d7565b005b610115610110366004610b9f565b6102ef565b6040516100e49190610c34565b60005473ffffffffffffffffffffffffffffffffffffffff166100c3565b61015361014e366004610b32565b6106c1565b6040805173ffffffffffffffffffffffffffffffffffffffff958616815293851660208501529184169183019190915290911660608201526080016100e4565b6101006101a1366004610c78565b6108a4565b6101006101b4366004610b32565b610978565b60015473ffffffffffffffffffffffffffffffffffffffff166100c3565b6101df610a8a565b73ffffffffffffffffffffffffffffffffffffffff8116610261576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600360248201527f6f6334000000000000000000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b60015460405173ffffffffffffffffffffffffffffffffffffffff8084169216907fa06677f7b64342b4bcbde423684dbdb5356acfe41ad0285b6ecbe6dc4bf427f290600090a3600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60606000806000806000806103038d6106c1565b80945081955082985083995050505050600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169350600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16925050508a73ffffffffffffffffffffffffffffffffffffffff1663c2b18aa06040518163ffffffff1660e01b8152600401600060405180830381865afa158015610424573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261046a9190810190610d53565b5167ffffffffffffffff81111561048357610483610cb1565b6040519080825280602002602001820160405280156104ac578160200160208202803683370190505b5094506000808373ffffffffffffffffffffffffffffffffffffffff16637a84ba6f878e8e8e6040518563ffffffff1660e01b81526004016104f19493929190610e3b565b600060405180830381865afa15801561050e573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526105549190810190610ee5565b9150915060005b82518110156106b05760008473ffffffffffffffffffffffffffffffffffffffff166366d98f7d8886858151811061059557610595610fa1565b60200260200101518686815181106105af576105af610fa1565b60200260200101518f8f6040518663ffffffff1660e01b81526004016105d9959493929190610fd0565b600060405180830381865afa1580156105f6573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261063c919081019061100c565b905060005b815181101561069d5781818151811061065c5761065c610fa1565b60200260200101518a828151811061067657610676610fa1565b6020026020010181815161068a9190611078565b90525061069681611091565b9050610641565b5050806106a990611091565b905061055b565b505050505050509695505050505050565b600080600080600085905060008173ffffffffffffffffffffffffffffffffffffffff1663504b82bf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610719573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073d91906110c9565b905060008273ffffffffffffffffffffffffffffffffffffffff1663e70c20d96040518163ffffffff1660e01b8152600401602060405180830381865afa15801561078c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b091906110c9565b905081818373ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107ff573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082391906110c9565b8373ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa15801561086e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089291906110c9565b96509650965096505050509193509193565b60015473ffffffffffffffffffffffffffffffffffffffff163314610925576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600360248201527f6f633200000000000000000000000000000000000000000000000000000000006044820152606401610258565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260026020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001691909216179055565b610980610a8a565b73ffffffffffffffffffffffffffffffffffffffff81166109fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600360248201527f6f633300000000000000000000000000000000000000000000000000000000006044820152606401610258565b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314610b0b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600360248201527f6f633100000000000000000000000000000000000000000000000000000000006044820152606401610258565b565b73ffffffffffffffffffffffffffffffffffffffff81168114610b2f57600080fd5b50565b600060208284031215610b4457600080fd5b8135610b4f81610b0d565b9392505050565b60008083601f840112610b6857600080fd5b50813567ffffffffffffffff811115610b8057600080fd5b602083019150836020828501011115610b9857600080fd5b9250929050565b60008060008060008060808789031215610bb857600080fd5b8635610bc381610b0d565b95506020870135610bd381610b0d565b9450604087013567ffffffffffffffff80821115610bf057600080fd5b610bfc8a838b01610b56565b90965094506060890135915080821115610c1557600080fd5b50610c2289828a01610b56565b979a9699509497509295939492505050565b6020808252825182820181905260009190848201906040850190845b81811015610c6c57835183529284019291840191600101610c50565b50909695505050505050565b60008060408385031215610c8b57600080fd5b8235610c9681610b0d565b91506020830135610ca681610b0d565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610d2757610d27610cb1565b604052919050565b600067ffffffffffffffff821115610d4957610d49610cb1565b5060051b60200190565b60006020808385031215610d6657600080fd5b825167ffffffffffffffff811115610d7d57600080fd5b8301601f81018513610d8e57600080fd5b8051610da1610d9c82610d2f565b610ce0565b81815260059190911b82018301908381019087831115610dc057600080fd5b928401925b82841015610de7578351610dd881610b0d565b82529284019290840190610dc5565b979650505050505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525060606040830152610e75606083018486610df2565b9695505050505050565b600082601f830112610e9057600080fd5b81516020610ea0610d9c83610d2f565b82815260059290921b84018101918181019086841115610ebf57600080fd5b8286015b84811015610eda5780518352918301918301610ec3565b509695505050505050565b60008060408385031215610ef857600080fd5b825167ffffffffffffffff80821115610f1057600080fd5b818501915085601f830112610f2457600080fd5b81516020610f34610d9c83610d2f565b82815260059290921b84018101918181019089841115610f5357600080fd5b948201945b83861015610f7157855182529482019490820190610f58565b91880151919650909350505080821115610f8a57600080fd5b50610f9785828601610e7f565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff86168152846020820152836040820152608060608201526000610de7608083018486610df2565b60006020828403121561101e57600080fd5b815167ffffffffffffffff81111561103557600080fd5b61104184828501610e7f565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561108b5761108b611049565b92915050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036110c2576110c2611049565b5060010190565b6000602082840312156110db57600080fd5b8151610b4f81610b0d56fea26469706673582212205b8aa8ef132638131d006595bfa47311f1464a53de0b2ab28a90ef2e4369b74964736f6c63430008120033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100885760003560e01c8063a8ee49fe1161005b578063a8ee49fe14610140578063aa67735414610193578063f2fde38b146101a6578063f77c4791146101b957600080fd5b8063038defd71461008d5780636d16fa41146100ed578063764a4acd146101025780638da5cb5b14610122575b600080fd5b6100c361009b366004610b32565b60026020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6101006100fb366004610b32565b6101d7565b005b610115610110366004610b9f565b6102ef565b6040516100e49190610c34565b60005473ffffffffffffffffffffffffffffffffffffffff166100c3565b61015361014e366004610b32565b6106c1565b6040805173ffffffffffffffffffffffffffffffffffffffff958616815293851660208501529184169183019190915290911660608201526080016100e4565b6101006101a1366004610c78565b6108a4565b6101006101b4366004610b32565b610978565b60015473ffffffffffffffffffffffffffffffffffffffff166100c3565b6101df610a8a565b73ffffffffffffffffffffffffffffffffffffffff8116610261576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600360248201527f6f6334000000000000000000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b60015460405173ffffffffffffffffffffffffffffffffffffffff8084169216907fa06677f7b64342b4bcbde423684dbdb5356acfe41ad0285b6ecbe6dc4bf427f290600090a3600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60606000806000806000806103038d6106c1565b80945081955082985083995050505050600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169350600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16925050508a73ffffffffffffffffffffffffffffffffffffffff1663c2b18aa06040518163ffffffff1660e01b8152600401600060405180830381865afa158015610424573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261046a9190810190610d53565b5167ffffffffffffffff81111561048357610483610cb1565b6040519080825280602002602001820160405280156104ac578160200160208202803683370190505b5094506000808373ffffffffffffffffffffffffffffffffffffffff16637a84ba6f878e8e8e6040518563ffffffff1660e01b81526004016104f19493929190610e3b565b600060405180830381865afa15801561050e573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526105549190810190610ee5565b9150915060005b82518110156106b05760008473ffffffffffffffffffffffffffffffffffffffff166366d98f7d8886858151811061059557610595610fa1565b60200260200101518686815181106105af576105af610fa1565b60200260200101518f8f6040518663ffffffff1660e01b81526004016105d9959493929190610fd0565b600060405180830381865afa1580156105f6573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261063c919081019061100c565b905060005b815181101561069d5781818151811061065c5761065c610fa1565b60200260200101518a828151811061067657610676610fa1565b6020026020010181815161068a9190611078565b90525061069681611091565b9050610641565b5050806106a990611091565b905061055b565b505050505050509695505050505050565b600080600080600085905060008173ffffffffffffffffffffffffffffffffffffffff1663504b82bf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610719573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073d91906110c9565b905060008273ffffffffffffffffffffffffffffffffffffffff1663e70c20d96040518163ffffffff1660e01b8152600401602060405180830381865afa15801561078c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b091906110c9565b905081818373ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107ff573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082391906110c9565b8373ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa15801561086e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089291906110c9565b96509650965096505050509193509193565b60015473ffffffffffffffffffffffffffffffffffffffff163314610925576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600360248201527f6f633200000000000000000000000000000000000000000000000000000000006044820152606401610258565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260026020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001691909216179055565b610980610a8a565b73ffffffffffffffffffffffffffffffffffffffff81166109fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600360248201527f6f633300000000000000000000000000000000000000000000000000000000006044820152606401610258565b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314610b0b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600360248201527f6f633100000000000000000000000000000000000000000000000000000000006044820152606401610258565b565b73ffffffffffffffffffffffffffffffffffffffff81168114610b2f57600080fd5b50565b600060208284031215610b4457600080fd5b8135610b4f81610b0d565b9392505050565b60008083601f840112610b6857600080fd5b50813567ffffffffffffffff811115610b8057600080fd5b602083019150836020828501011115610b9857600080fd5b9250929050565b60008060008060008060808789031215610bb857600080fd5b8635610bc381610b0d565b95506020870135610bd381610b0d565b9450604087013567ffffffffffffffff80821115610bf057600080fd5b610bfc8a838b01610b56565b90965094506060890135915080821115610c1557600080fd5b50610c2289828a01610b56565b979a9699509497509295939492505050565b6020808252825182820181905260009190848201906040850190845b81811015610c6c57835183529284019291840191600101610c50565b50909695505050505050565b60008060408385031215610c8b57600080fd5b8235610c9681610b0d565b91506020830135610ca681610b0d565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610d2757610d27610cb1565b604052919050565b600067ffffffffffffffff821115610d4957610d49610cb1565b5060051b60200190565b60006020808385031215610d6657600080fd5b825167ffffffffffffffff811115610d7d57600080fd5b8301601f81018513610d8e57600080fd5b8051610da1610d9c82610d2f565b610ce0565b81815260059190911b82018301908381019087831115610dc057600080fd5b928401925b82841015610de7578351610dd881610b0d565b82529284019290840190610dc5565b979650505050505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525060606040830152610e75606083018486610df2565b9695505050505050565b600082601f830112610e9057600080fd5b81516020610ea0610d9c83610d2f565b82815260059290921b84018101918181019086841115610ebf57600080fd5b8286015b84811015610eda5780518352918301918301610ec3565b509695505050505050565b60008060408385031215610ef857600080fd5b825167ffffffffffffffff80821115610f1057600080fd5b818501915085601f830112610f2457600080fd5b81516020610f34610d9c83610d2f565b82815260059290921b84018101918181019089841115610f5357600080fd5b948201945b83861015610f7157855182529482019490820190610f58565b91880151919650909350505080821115610f8a57600080fd5b50610f9785828601610e7f565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff86168152846020820152836040820152608060608201526000610de7608083018486610df2565b60006020828403121561101e57600080fd5b815167ffffffffffffffff81111561103557600080fd5b61104184828501610e7f565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561108b5761108b611049565b92915050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036110c2576110c2611049565b5060010190565b6000602082840312156110db57600080fd5b8151610b4f81610b0d56fea26469706673582212205b8aa8ef132638131d006595bfa47311f1464a53de0b2ab28a90ef2e4369b74964736f6c63430008120033

Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.