POL Price: $0.447173 (+1.03%)
 

Overview

POL Balance

Polygon PoS Chain LogoPolygon PoS Chain LogoPolygon PoS Chain Logo0 POL

POL Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Accept Ownership488394392023-10-17 21:12:12464 days ago1697577132IN
0x1513b4D3...13A96ddfE
0 POL0.0019834270.08337407
Nominate New Own...488393752023-10-17 21:09:56464 days ago1697576996IN
0x1513b4D3...13A96ddfE
0 POL0.0017585264.5424622
Nominate New Own...488393252023-10-17 21:08:05464 days ago1697576885IN
0x1513b4D3...13A96ddfE
0 POL0.0031684967.20597099
Set Gauge State298135592022-06-21 3:31:39948 days ago1655782299IN
0x1513b4D3...13A96ddfE
0 POL0.0015152130.00000004
Set Gauge State298135512022-06-21 3:31:23948 days ago1655782283IN
0x1513b4D3...13A96ddfE
0 POL0.0015152130.00000004
Set Curator286779742022-05-23 16:37:27976 days ago1653323847IN
0x1513b4D3...13A96ddfE
0 POL0.0029074100
Set Gauge State284008162022-05-16 19:38:09983 days ago1652729889IN
0x1513b4D3...13A96ddfE
0 POL0.0021160941.89709549
Set Gauge State284008072022-05-16 19:37:51983 days ago1652729871IN
0x1513b4D3...13A96ddfE
0 POL0.0021160941.89709549
Distribute Rewar...284007182022-05-16 19:34:49983 days ago1652729689IN
0x1513b4D3...13A96ddfE
0 POL0.0073415343.97684745
Distribute Rewar...284006942022-05-16 19:33:57983 days ago1652729637IN
0x1513b4D3...13A96ddfE
0 POL0.0083824150.21847938
Distribute Rewar...284006712022-05-16 19:33:11983 days ago1652729591IN
0x1513b4D3...13A96ddfE
0 POL0.0090635854.29931604
Distribute Rewar...284006572022-05-16 19:32:43983 days ago1652729563IN
0x1513b4D3...13A96ddfE
0 POL0.0090674454.29931604
Distribute Rewar...284004222022-05-16 19:24:37983 days ago1652729077IN
0x1513b4D3...13A96ddfE
0 POL0.0100151460
Distribute Rewar...284001382022-05-16 19:14:53983 days ago1652728493IN
0x1513b4D3...13A96ddfE
0 POL0.0026221377.78266591
Distribute Rewar...284000602022-05-16 19:12:09983 days ago1652728329IN
0x1513b4D3...13A96ddfE
0 POL0.0017376651.54589141
Distribute Rewar...281232252022-05-09 19:30:45990 days ago1652124645IN
0x1513b4D3...13A96ddfE
0 POL0.02260483135.42400675
Distribute Rewar...281231582022-05-09 19:28:27990 days ago1652124507IN
0x1513b4D3...13A96ddfE
0 POL0.03242322194.24527167
Distribute Rewar...281231182022-05-09 19:27:03990 days ago1652124423IN
0x1513b4D3...13A96ddfE
0 POL0.050097300
Distribute Rewar...281229902022-05-09 19:22:39990 days ago1652124159IN
0x1513b4D3...13A96ddfE
0 POL0.0321054192.34121264
Distribute Rewar...281229632022-05-09 19:21:45990 days ago1652124105IN
0x1513b4D3...13A96ddfE
0 POL0.01245902215.98010582
Distribute Rewar...281227382022-05-09 19:13:58990 days ago1652123638IN
0x1513b4D3...13A96ddfE
0 POL0.01218735361.52472297
Distribute Rewar...281227292022-05-09 19:13:40990 days ago1652123620IN
0x1513b4D3...13A96ddfE
0 POL0.01218735361.52472297
Distribute Rewar...281227212022-05-09 19:13:24990 days ago1652123604IN
0x1513b4D3...13A96ddfE
0 POL0.01218735361.52472297
Distribute Rewar...281227112022-05-09 19:13:04990 days ago1652123584IN
0x1513b4D3...13A96ddfE
0 POL0.01466018434.87838306
Distribute Rewar...281226882022-05-09 19:12:18990 days ago1652123538IN
0x1513b4D3...13A96ddfE
0 POL0.07981105434.87838306
View all transactions

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
C3GaugeC3RewardsDistributorV2

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at polygonscan.com on 2022-04-25
*/

// File: contracts/Staking/C3/IStakingRewardsDualV5.sol


pragma solidity >=0.6.11;
pragma experimental ABIEncoderV2;

interface IStakingRewardsDualV5 {
    // Views

    function earned(address account) external view returns (uint256, uint256);

    function getRewardForDuration() external view returns (uint256, uint256);

    function totalSupply() external view returns (uint256);

    function balanceOf(address account) external view returns (uint256);

    // Mutative

    function stake(uint256 amount) external;

    function withdraw(uint256 amount) external;

    function getReward() external;

    function setRewardRates(uint256 _new_rate0, uint256 _new_rate1, bool sync_too) external;

    //function exit() external;
}


// File: contracts/Utils/ReentrancyGuard.sol


pragma solidity >=0.6.11;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}
// File: contracts/Staking/Owned.sol


pragma solidity >=0.6.11;

// https://docs.synthetix.io/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 {
        require(msg.sender == owner, "Only the contract owner may perform this action");
        _;
    }

    event OwnerNominated(address newOwner);
    event OwnerChanged(address oldOwner, address newOwner);
}
// File: contracts/Uniswap/TransferHelper.sol


pragma solidity >=0.6.11;

// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library TransferHelper {
    function safeApprove(address token, address to, uint value) internal {
        // bytes4(keccak256(bytes('approve(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: APPROVE_FAILED');
    }

    function safeTransfer(address token, address to, uint value) internal {
        // bytes4(keccak256(bytes('transfer(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FAILED');
    }

    function safeTransferFrom(address token, address from, address to, uint value) internal {
        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FROM_FAILED');
    }

    function safeTransferETH(address to, uint value) internal {
        (bool success,) = to.call{value:value}(new bytes(0));
        require(success, 'TransferHelper: ETH_TRANSFER_FAILED');
    }
}
// File: contracts/Misc_AMOs/solana/IWormhole.sol


pragma solidity >=0.6.11;

interface IWormhole {
  function guardian_set_expirity () external view returns (uint32);
  function guardian_set_index () external view returns (uint32);
  function guardian_sets (uint32) external view returns (uint32 expiration_time);
  function isWrappedAsset (address) external view returns (bool);
  function lockAssets (address asset, uint256 amount, bytes32 recipient, uint8 target_chain, uint32 nonce, bool refund_dust) external;
  function lockETH (bytes32 recipient, uint8 target_chain, uint32 nonce) external;
  function wrappedAssetMaster () external view returns (address);
  function wrappedAssets (bytes32) external view returns (address);
}

// File: contracts/Misc_AMOs/polygon/IRootChainManager.sol


pragma solidity >=0.6.11;

interface IRootChainManager {
  function depositFor (address user, address rootToken, bytes memory depositData) external;
  function tokenToType (address) external view returns (bytes32);
  function typeToPredicate (bytes32) external view returns (address);

}

// interface GeneratedInterface {
//   function DEFAULT_ADMIN_ROLE (  ) external view returns ( bytes32 );
//   function DEPOSIT (  ) external view returns ( bytes32 );
//   function ERC712_VERSION (  ) external view returns ( string );
//   function ETHER_ADDRESS (  ) external view returns ( address );
//   function MAPPER_ROLE (  ) external view returns ( bytes32 );
//   function MAP_TOKEN (  ) external view returns ( bytes32 );
//   function checkpointManagerAddress (  ) external view returns ( address );
//   function childChainManagerAddress (  ) external view returns ( address );
//   function childToRootToken ( address ) external view returns ( address );
//   function cleanMapToken ( address rootToken, address childToken ) external;
//   function depositEtherFor ( address user ) external;
//   function depositFor ( address user, address rootToken, bytes depositData ) external;
//   function executeMetaTransaction ( address userAddress, bytes functionSignature, bytes32 sigR, bytes32 sigS, uint8 sigV ) external returns ( bytes );
//   function exit ( bytes inputData ) external;
//   function getChainId (  ) external pure returns ( uint256 );
//   function getDomainSeperator (  ) external view returns ( bytes32 );
//   function getNonce ( address user ) external view returns ( uint256 nonce );
//   function getRoleAdmin ( bytes32 role ) external view returns ( bytes32 );
//   function getRoleMember ( bytes32 role, uint256 index ) external view returns ( address );
//   function getRoleMemberCount ( bytes32 role ) external view returns ( uint256 );
//   function grantRole ( bytes32 role, address account ) external;
//   function hasRole ( bytes32 role, address account ) external view returns ( bool );
//   function initialize ( address _owner ) external;
//   function initializeEIP712 (  ) external;
//   function mapToken ( address rootToken, address childToken, bytes32 tokenType ) external;
//   function processedExits ( bytes32 ) external view returns ( bool );
//   function registerPredicate ( bytes32 tokenType, address predicateAddress ) external;
//   function remapToken ( address rootToken, address childToken, bytes32 tokenType ) external;
//   function renounceRole ( bytes32 role, address account ) external;
//   function revokeRole ( bytes32 role, address account ) external;
//   function rootToChildToken ( address ) external view returns ( address );
//   function setCheckpointManager ( address newCheckpointManager ) external;
//   function setChildChainManagerAddress ( address newChildChainManager ) external;
//   function setStateSender ( address newStateSender ) external;
//   function setupContractId (  ) external;
//   function stateSenderAddress (  ) external view returns ( address );
//   function tokenToType ( address ) external view returns ( bytes32 );
//   function typeToPredicate ( bytes32 ) external view returns ( address );
// }

// File: contracts/Misc_AMOs/harmony/IERC20EthManager.sol


pragma solidity >=0.6.11;


interface IERC20EthManager {
  function lockToken(address ethTokenAddr, uint256 amount, address recipient) external;
  function lockTokenFor(address ethTokenAddr, address userAddr, uint256 amount, address recipient) external;
  function unlockToken(address ethTokenAddr, uint256 amount, address recipient, bytes32 receiptId) external;
  function usedEvents_(bytes32) external view returns(bool);
  function wallet() external view returns(address);
}
// File: contracts/Curve/IC3GaugeC3RewardsDistributor.sol


pragma solidity >=0.6.11;

interface IC3GaugeC3RewardsDistributor {
  function acceptOwnership() external;
  function curator_address() external view returns(address);
  function currentReward(address gauge_address) external view returns(uint256 reward_amount);
  function distributeReward(address gauge_address) external returns(uint256 weeks_elapsed, uint256 reward_tally);
  function distributionsOn() external view returns(bool);
  function gauge_whitelist(address) external view returns(bool);
  function is_middleman(address) external view returns(bool);
  function last_time_gauge_paid(address) external view returns(uint256);
  function nominateNewOwner(address _owner) external;
  function nominatedOwner() external view returns(address);
  function owner() external view returns(address);
  function recoverERC20(address tokenAddress, uint256 tokenAmount) external;
  function setCurator(address _new_curator_address) external;
  function setGaugeController(address _gauge_controller_address) external;
  function setGaugeState(address _gauge_address, bool _is_middleman, bool _is_active) external;
  function setTimelock(address _new_timelock) external;
  function timelock_address() external view returns(address);
  function toggleDistributions() external;
}
// File: contracts/Curve/IC3GaugeController.sol


pragma solidity >=0.6.11;

// https://github.com/swervefi/swerve/edit/master/packages/swerve-contracts/interfaces/IGaugeController.sol

interface IC3GaugeController {
    struct Point {
        uint256 bias;
        uint256 slope;
    }

    struct VotedSlope {
        uint256 slope;
        uint256 power;
        uint256 end;
    }

    // Public variables
    function admin() external view returns (address);
    function future_admin() external view returns (address);
    function token() external view returns (address);
    function voting_escrow() external view returns (address);
    function n_gauge_types() external view returns (int128);
    function n_gauges() external view returns (int128);
    function gauge_type_names(int128) external view returns (string memory);
    function gauges(uint256) external view returns (address);
    function vote_user_slopes(address, address)
        external
        view
        returns (VotedSlope memory);
    function vote_user_power(address) external view returns (uint256);
    function last_user_vote(address, address) external view returns (uint256);
    function points_weight(address, uint256)
        external
        view
        returns (Point memory);
    function time_weight(address) external view returns (uint256);
    function points_sum(int128, uint256) external view returns (Point memory);
    function time_sum(uint256) external view returns (uint256);
    function points_total(uint256) external view returns (uint256);
    function time_total() external view returns (uint256);
    function points_type_weight(int128, uint256)
        external
        view
        returns (uint256);
    function time_type_weight(uint256) external view returns (uint256);

    // Getter functions
    function gauge_types(address) external view returns (int128);
    function gauge_relative_weight(address) external view returns (uint256);
    function gauge_relative_weight(address, uint256) external view returns (uint256);
    function get_gauge_weight(address) external view returns (uint256);
    function get_type_weight(int128) external view returns (uint256);
    function get_total_weight() external view returns (uint256);
    function get_weights_sum_per_type(int128) external view returns (uint256);

    // External functions
    function commit_transfer_ownership(address) external;
    function apply_transfer_ownership() external;
    function add_gauge(
        address,
        int128,
        uint256
    ) external;
    function checkpoint() external;
    function checkpoint_gauge(address) external;
    function global_emission_rate() external view returns (uint256);
    function gauge_relative_weight_write(address)
        external
        returns (uint256);
    function gauge_relative_weight_write(address, uint256)
        external
        returns (uint256);
    function add_type(string memory, uint256) external;
    function change_type_weight(int128, uint256) external;
    function change_gauge_weight(address, uint256) external;
    function change_global_emission_rate(uint256) external;
    function vote_for_gauge_weights(address, uint256) external;
}

// File: contracts/Utils/Address.sol


pragma solidity >=0.6.11 <0.9.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}
// File: contracts/Common/Context.sol


pragma solidity >=0.6.11;

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

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


pragma solidity >=0.6.11;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     *
     * _Available since v2.4.0._
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     *
     * _Available since v2.4.0._
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     *
     * _Available since v2.4.0._
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}
// File: contracts/ERC20/IERC20.sol


pragma solidity >=0.6.11;



/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see {ERC20Detailed}.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

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

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


// File: contracts/ERC20/SafeERC20.sol


pragma solidity >=0.6.11;




/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using SafeMath for uint256;
    using Address for address;

    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}
// File: contracts/ERC20/ERC20.sol


pragma solidity >=0.6.11;






/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20Mintable}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of ERC20 applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
 
contract ERC20 is Context, IERC20 {
    using SafeMath for uint256;

    mapping (address => uint256) private _balances;

    mapping (address => mapping (address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;
    uint8 private _decimals;
    
    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor (string memory __name, string memory __symbol) public {
        _name = __name;
        _symbol = __symbol;
        _decimals = 18;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
     * called.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view returns (uint8) {
        return _decimals;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.approve(address spender, uint256 amount)
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20};
     *
     * Requirements:
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for `sender`'s tokens of at least
     * `amount`.
     */
    function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(address sender, address recipient, uint256 amount) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements
     *
     * - `to` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) public virtual {
        _burn(_msgSender(), amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, deducting from the caller's
     * allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for `accounts`'s tokens of at least
     * `amount`.
     */
    function burnFrom(address account, uint256 amount) public virtual {
        uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, "ERC20: burn amount exceeds allowance");

        _approve(account, _msgSender(), decreasedAllowance);
        _burn(account, amount);
    }


    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
     *
     * This is internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(address owner, address spender, uint256 amount) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`.`amount` is then deducted
     * from the caller's allowance.
     *
     * See {_burn} and {_approve}.
     */
    function _burnFrom(address account, uint256 amount) internal virtual {
        _burn(account, amount);
        _approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance"));
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of `from`'s tokens
     * will be to transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of `from`'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:using-hooks.adoc[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}

// File: contracts/Math/Math.sol


pragma solidity >=0.6.11;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow, so we distribute
        return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
    }

    // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
    function sqrt(uint y) internal pure returns (uint z) {
        if (y > 3) {
            z = y;
            uint x = y / 2 + 1;
            while (x < z) {
                z = x;
                x = (y / x + x) / 2;
            }
        } else if (y != 0) {
            z = 1;
        }
    }
}
// File: contracts/Curve/C3MiddlemanGauge.sol


pragma solidity >=0.6.11;

// ====================================================================
//             _____ _____  ______ _
//            /  __ |____ | |  ___(_)
//           | /  \/   / / | |_   _ _ __   __ _ _ __   ___ ___
//           | |       \ \ |  _| | | '_ \ / _` | '_ \ / __/ _ \
//           | \__/.___/ / | |   | | | | | (_| | | | | (_|  __/
//           \____\____/  \_|   |_|_| |_|\__,_|_| |_|\___\___|
//
// ====================================================================
// ======================== C3MiddlemanGauge ========================
// ====================================================================
// Looks at the gauge controller contract and pushes out C3 rewards once
// a week to the gauges (farms).
// This contract is what gets added to the gauge as a 'slice'
// Original pulled from Frax Finance: https://github.com/FraxFinance
// Frax Finance: https://github.com/FraxFinance
// C3GaugeC3RewardsDistributor is a fork of Frax version with variables renamed to C3
//  "'can I copy your homework?'/ 'yeah just change it up a bit so it doesn't look obvious you copied' / 'ok'

// Frax Finance: https://github.com/FraxFinance

// Primary Author(s)
// Travis Moore: https://github.com/FortisFortuna

// Reviewer(s) / Contributor(s)
// Jason Huan: https://github.com/jasonhuan
// Sam Kazemian: https://github.com/samkazemian












contract C3MiddlemanGauge is Owned, ReentrancyGuard {
    using SafeMath for uint256;
    using SafeERC20 for ERC20;

    /* ========== STATE VARIABLES ========== */

    // Instances and addresses
    address public reward_token_address = 0xed4933b6E94FddE8dF3Be3258307dFAC0e8c9A4c; // C3 Reward Token TODO: Replace with mainnet C3 Address
    address public rewards_distributor_address;

    // Informational
    string public name;

    // Admin addresses
    address public timelock_address;

    // Gauge-related
    address public bridge_address;
    uint256 public bridge_type;
    address public destination_address_override;
    string public non_evm_destination_address;

    // Tracking
    uint32 public fake_nonce;

    /* ========== MODIFIERS ========== */

    modifier onlyByOwnGov() {
        require(msg.sender == owner || msg.sender == timelock_address, "Not owner or timelock");
        _;
    }

    modifier onlyRewardsDistributor() {
        require(msg.sender == rewards_distributor_address, "Not rewards distributor");
        _;
    }

    /* ========== CONSTRUCTOR ========== */

    constructor (
        address _owner,
        address _timelock_address,
        address _rewards_distributor_address,
        address _bridge_address,
        uint256 _bridge_type,
        address _destination_address_override,
        string memory _non_evm_destination_address,
        string memory _name
    ) Owned(_owner) {
        timelock_address = _timelock_address;

        rewards_distributor_address = _rewards_distributor_address;

        bridge_address = _bridge_address;
        bridge_type = _bridge_type;
        destination_address_override = _destination_address_override;
        non_evm_destination_address = _non_evm_destination_address;

        name = _name;

        fake_nonce = 0;
    }

    /* ========== MUTATIVE FUNCTIONS ========== */

    // Callable only by the rewards distributor
    function pullAndBridge(uint256 reward_amount) external onlyRewardsDistributor nonReentrant {
        require(bridge_address != address(0), "Invalid bridge address");

        // Pull in the rewards from the rewards distributor
        TransferHelper.safeTransferFrom(reward_token_address, rewards_distributor_address, address(this), reward_amount);

        address address_to_send_to = address(this);
        if (destination_address_override != address(0)) address_to_send_to = destination_address_override;

        if (bridge_type == 0) {
            // Avalanche [Anyswap]
            TransferHelper.safeTransfer(reward_token_address, bridge_address, reward_amount);
        }
        else if (bridge_type == 1) {
            // BSC
            TransferHelper.safeTransfer(reward_token_address, bridge_address, reward_amount);
        }
        else if (bridge_type == 2) {
            // Fantom [Multichain / Anyswap]
            // Bridge is 0xC564EE9f21Ed8A2d8E7e76c085740d5e4c5FaFbE
            TransferHelper.safeTransfer(reward_token_address, bridge_address, reward_amount);
        }
        else if (bridge_type == 3) {
            // Polygon
            // Bridge is 0xA0c68C638235ee32657e8f720a23ceC1bFc77C77
            // Interesting info https://blog.cryption.network/cryption-network-launches-cross-chain-staking-6cf000c25477

            // Approve
            IRootChainManager rootChainMgr = IRootChainManager(bridge_address);
            bytes32 tokenType = rootChainMgr.tokenToType(reward_token_address);
            address predicate = rootChainMgr.typeToPredicate(tokenType);
            ERC20(reward_token_address).approve(predicate, reward_amount);
            
            // DepositFor
            bytes memory depositData = abi.encode(reward_amount);
            rootChainMgr.depositFor(address_to_send_to, reward_token_address, depositData);
        }
        else if (bridge_type == 4) {
            // Solana
            // Wormhole Bridge is 0xf92cD566Ea4864356C5491c177A430C222d7e678

            revert("Not supported yet");

            // // Approve
            // ERC20(reward_token_address).approve(bridge_address, reward_amount);

            // // lockAssets
            // require(non_evm_destination_address != 0, "Invalid destination");
            // // non_evm_destination_address = base58 -> hex
            // // https://www.appdevtools.com/base58-encoder-decoder
            // IWormhole(bridge_address).lockAssets(
            //     reward_token_address,
            //     reward_amount,
            //     non_evm_destination_address,
            //     1,
            //     fake_nonce,
            //     false
            // );
        }
        else if (bridge_type == 5) {
            // Harmony
            // Bridge is at 0x2dccdb493827e15a5dc8f8b72147e6c4a5620857

            // Approve
            ERC20(reward_token_address).approve(bridge_address, reward_amount);

            // lockToken
            IERC20EthManager(bridge_address).lockToken(reward_token_address, reward_amount, address_to_send_to);
        }

        fake_nonce += 1;
    }

    /* ========== RESTRICTED FUNCTIONS - Owner or timelock only ========== */
    
    // Added to support recovering LP Rewards and other mistaken tokens from other systems to be distributed to holders
    function recoverERC20(address tokenAddress, uint256 tokenAmount) external onlyByOwnGov {
        // Only the owner address can ever receive the recovery withdrawal
        TransferHelper.safeTransfer(tokenAddress, owner, tokenAmount);
        emit RecoveredERC20(tokenAddress, tokenAmount);
    }

    // Generic proxy
    function execute(
        address _to,
        uint256 _value,
        bytes calldata _data
    ) external onlyByOwnGov returns (bool, bytes memory) {
        (bool success, bytes memory result) = _to.call{value:_value}(_data);
        return (success, result);
    }

    function setTimelock(address _new_timelock) external onlyByOwnGov {
        timelock_address = _new_timelock;
    }

    function setBridgeInfo(address _bridge_address, uint256 _bridge_type, address _destination_address_override, string memory _non_evm_destination_address) external onlyByOwnGov {
        bridge_address = _bridge_address;
        
        // 0: Avalanche
        // 1: BSC
        // 2: Fantom
        // 3: Polygon
        // 4: Solana
        // 5: Harmony
        bridge_type = _bridge_type;

        // Overridden cross-chain destination address
        destination_address_override = _destination_address_override;

        // Set bytes32 / non-EVM address on the other chain, if applicable
        non_evm_destination_address = _non_evm_destination_address;
        
        emit BridgeInfoChanged(_bridge_address, _bridge_type, _destination_address_override, _non_evm_destination_address);
    }

    function setRewardsDistributor(address _rewards_distributor_address) external onlyByOwnGov {
        rewards_distributor_address = _rewards_distributor_address;
    }

    /* ========== EVENTS ========== */

    event RecoveredERC20(address token, uint256 amount);
    event BridgeInfoChanged(address bridge_address, uint256 bridge_type, address destination_address_override, string non_evm_destination_address);
}

// File: contracts/Curve/C3GaugeC3RewardsDistributorv2.sol


pragma solidity >=0.6.11;
// ====================================================================
//             _____ _____  ______ _
//            /  __ |____ | |  ___(_)
//           | /  \/   / / | |_   _ _ __   __ _ _ __   ___ ___
//           | |       \ \ |  _| | | '_ \ / _` | '_ \ / __/ _ \
//           | \__/.___/ / | |   | | | | | (_| | | | | (_|  __/
//           \____\____/  \_|   |_|_| |_|\__,_|_| |_|\___\___|
//
// ====================================================================
// ================== C3GaugeC3RewardsDistributorv2 ==================
// ==================================================================== 
// Looks at the gauge controller contract and pushes out C3 rewards once
// a week to the gauges (farms) // Allows contract to override rewardRate on staking gauges
// Original pulled from Frax Finance: https://github.com/FraxFinance
// Frax Finance: https://github.com/FraxFinance
// C3GaugeC3RewardsDistributor is a fork of Frax version with variables renamed to C3
//  "'can I copy your homework?'/ 'yeah just change it up a bit so it doesn't look obvious you copied' / 'ok'
// Primary Author(s)
// Travis Moore: https://github.com/FortisFortuna

// Reviewer(s) / Contributor(s)
// Jason Huan: https://github.com/jasonhuan
// Sam Kazemian: https://github.com/samkazemian











contract C3GaugeC3RewardsDistributorV2 is Owned, ReentrancyGuard {
    using SafeMath for uint256;
    using SafeERC20 for ERC20;

    /* ========== STATE VARIABLES ========== */

    // Instances and addresses
    address public reward_token_address;
    IC3GaugeController public gauge_controller;

    // Admin addresses
    address public timelock_address;
    address public curator_address;

    // Constants
    uint256 private constant MULTIPLIER_PRECISION = 1e18;
    uint256 private constant ONE_WEEK = 604800;

    // Gauge controller related
    mapping(address => bool) public gauge_whitelist;
    mapping(address => bool) public is_middleman; // For cross-chain farms, use a middleman contract to push to a bridge
    mapping(address => uint256) public last_time_gauge_paid;

    // Booleans
    bool public distributionsOn;

    /* ========== MODIFIERS ========== */

    modifier onlyByOwnGov() {
        require(msg.sender == owner || msg.sender == timelock_address, "Not owner or timelock");
        _;
    }

    modifier onlyByOwnerOrCuratorOrGovernance() {
        require(msg.sender == owner || msg.sender == curator_address || msg.sender == timelock_address, "Not owner, curator, or timelock");
        _;
    }

    modifier isDistributing() {
        require(distributionsOn == true, "Distributions are off");
        _;
    }

    /* ========== CONSTRUCTOR ========== */

    constructor (
        address _owner,
        address _timelock_address,
        address _curator_address,
        address _reward_token_address,
        address _gauge_controller_address
    ) Owned(_owner) {
        curator_address = _curator_address;
        timelock_address = _timelock_address;

        reward_token_address = _reward_token_address;
        gauge_controller = IC3GaugeController(_gauge_controller_address);

        distributionsOn = true;

    }

    /* ========== VIEWS ========== */

    // Current weekly reward amount
    function currentReward(address gauge_address) public view returns (uint256 reward_amount) {
        uint256 rel_weight = gauge_controller.gauge_relative_weight(gauge_address, block.timestamp);
        uint256 rwd_rate = (gauge_controller.global_emission_rate()).mul(rel_weight).div(1e18);
        reward_amount = rwd_rate.mul(ONE_WEEK);
    }

    /* ========== MUTATIVE FUNCTIONS ========== */
    // Callable by curator
    function distributeRewardAndUpdateRate(address gauge_address, uint256 nonC3Rate) public isDistributing nonReentrant onlyByOwnerOrCuratorOrGovernance returns (uint256 weeks_elapsed, uint256 reward_tally) {
        require(gauge_whitelist[gauge_address], "Gauge not whitelisted");

        // Calculate the elapsed time in weeks.
        uint256 last_time_paid = last_time_gauge_paid[gauge_address];

        // Edge case for first reward for this gauge
        if (last_time_paid == 0){
            weeks_elapsed = 1;
        }
        else {
            // Truncation desired
            weeks_elapsed = (block.timestamp).sub(last_time_gauge_paid[gauge_address]) / ONE_WEEK;

            // Return early here for 0 weeks instead of throwing, as it could have bad effects in other contracts
            if (weeks_elapsed == 0) {
                return (0, 0);
            }
        }

        // NOTE: This will always use the current global_emission_rate()
        reward_tally = 0;
        for (uint i = 0; i < (weeks_elapsed); i++){
            uint256 rel_weight_at_week;
            if (i == 0) {
                // Mutative, for the current week. Makes sure the weight is checkpointed. Also returns the weight.
                rel_weight_at_week = gauge_controller.gauge_relative_weight_write(gauge_address, block.timestamp);
            }
            else {
                // View
                rel_weight_at_week = gauge_controller.gauge_relative_weight(gauge_address, (block.timestamp).sub(ONE_WEEK * i));
            }
            uint256 rwd_rate_at_week = (gauge_controller.global_emission_rate()).mul(rel_weight_at_week).div(1e18);
            reward_tally = reward_tally.add(rwd_rate_at_week.mul(ONE_WEEK));
        }

        // Update the last time paid
        last_time_gauge_paid[gauge_address] = block.timestamp;

        if (is_middleman[gauge_address]){
            // Cross chain: Pay out the rewards to the middleman contract
            // Approve for the middleman first
            ERC20(reward_token_address).approve(gauge_address, reward_tally);

            // Trigger the middleman
            C3MiddlemanGauge(gauge_address).pullAndBridge(reward_tally);
        }
        else {
            // Mainnet: Pay out the rewards directly to the gauge
            TransferHelper.safeTransfer(reward_token_address, gauge_address, reward_tally);
            // Adjust RewardRates accordingly, on per week basis
            uint256 newRewardRate = reward_tally.div(ONE_WEEK);
            IStakingRewardsDualV5(gauge_address).setRewardRates(newRewardRate, nonC3Rate, true );
        }

        emit RewardDistributed(gauge_address, reward_tally);
    }


    /* ========== RESTRICTED FUNCTIONS - Curator / migrator callable ========== */

    // For emergency situations
    function toggleDistributions() external onlyByOwnerOrCuratorOrGovernance {
        distributionsOn = !distributionsOn;

        emit DistributionsToggled(distributionsOn);
    }

    /* ========== RESTRICTED FUNCTIONS - Owner or timelock only ========== */
    
    // Added to support recovering LP Rewards and other mistaken tokens from other systems to be distributed to holders
    function recoverERC20(address tokenAddress, uint256 tokenAmount) external onlyByOwnGov {
        // Only the owner address can ever receive the recovery withdrawal
        TransferHelper.safeTransfer(tokenAddress, owner, tokenAmount);
        emit RecoveredERC20(tokenAddress, tokenAmount);
    }

    function setGaugeState(address _gauge_address, bool _is_middleman, bool _is_active) external onlyByOwnGov {
        is_middleman[_gauge_address] = _is_middleman;
        gauge_whitelist[_gauge_address] = _is_active;

        emit GaugeStateChanged(_gauge_address, _is_middleman, _is_active);
    }

    function setTimelock(address _new_timelock) external onlyByOwnGov {
        timelock_address = _new_timelock;
    }

    function setCurator(address _new_curator_address) external onlyByOwnGov {
        curator_address = _new_curator_address;
    }

    function setGaugeController(address _gauge_controller_address) external onlyByOwnGov {
        gauge_controller = IC3GaugeController(_gauge_controller_address);
    }

    /* ========== EVENTS ========== */

    event RewardDistributed(address indexed gauge_address, uint256 reward_amount);
    event RecoveredERC20(address token, uint256 amount);
    event GaugeStateChanged(address gauge_address, bool is_middleman, bool is_active);
    event DistributionsToggled(bool distibutions_state);
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_timelock_address","type":"address"},{"internalType":"address","name":"_curator_address","type":"address"},{"internalType":"address","name":"_reward_token_address","type":"address"},{"internalType":"address","name":"_gauge_controller_address","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"distibutions_state","type":"bool"}],"name":"DistributionsToggled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"gauge_address","type":"address"},{"indexed":false,"internalType":"bool","name":"is_middleman","type":"bool"},{"indexed":false,"internalType":"bool","name":"is_active","type":"bool"}],"name":"GaugeStateChanged","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":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RecoveredERC20","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"gauge_address","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward_amount","type":"uint256"}],"name":"RewardDistributed","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"curator_address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"gauge_address","type":"address"}],"name":"currentReward","outputs":[{"internalType":"uint256","name":"reward_amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"gauge_address","type":"address"},{"internalType":"uint256","name":"nonC3Rate","type":"uint256"}],"name":"distributeRewardAndUpdateRate","outputs":[{"internalType":"uint256","name":"weeks_elapsed","type":"uint256"},{"internalType":"uint256","name":"reward_tally","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"distributionsOn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gauge_controller","outputs":[{"internalType":"contract IC3GaugeController","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"gauge_whitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"is_middleman","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"last_time_gauge_paid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nominatedOwner","outputs":[{"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":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reward_token_address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_new_curator_address","type":"address"}],"name":"setCurator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gauge_controller_address","type":"address"}],"name":"setGaugeController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gauge_address","type":"address"},{"internalType":"bool","name":"_is_middleman","type":"bool"},{"internalType":"bool","name":"_is_active","type":"bool"}],"name":"setGaugeState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_new_timelock","type":"address"}],"name":"setTimelock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"timelock_address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleDistributions","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b506040516200163d3803806200163d83398101604081905262000034916200016f565b846001600160a01b038116620000905760405162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f74206265203000000000000000604482015260640160405180910390fd5b600080546001600160a01b0319166001600160a01b03831690811782556040805192835260208301919091527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a15060016002819055600680546001600160a01b03199081166001600160a01b0396871617909155600580548216968616969096179095556003805486169385169390931790925560048054909416921691909117909155600a805460ff1916909117905550620001df565b80516001600160a01b03811681146200016a57600080fd5b919050565b600080600080600060a086880312156200018857600080fd5b620001938662000152565b9450620001a36020870162000152565b9350620001b36040870162000152565b9250620001c36060870162000152565b9150620001d36080870162000152565b90509295509295909350565b61144e80620001ef6000396000f3fe608060405234801561001057600080fd5b506004361061012b5760003560e01c80638980f11f116100ad578063d8b9a01811610071578063d8b9a0181461028e578063dc6663c7146102a1578063e81e17c6146102b4578063e8e5d51d146102d4578063e90956cf146102fc57600080fd5b80638980f11f146102215780638da5cb5b146102345780639d18e4b014610247578063bdacb30314610268578063c92073c11461027b57600080fd5b806353a47bb7116100f457806353a47bb7146101a5578063570b1e99146101d0578063678a2226146101e35780636ca81c1c146101f657806379ba50971461021957600080fd5b806291d2b8146101305780631627540c146101455780631f8a7edf146101585780632fd37b081461017a578063305d6d5f1461019d575b600080fd5b61014361013e3660046111f4565b61030f565b005b6101436101533660046111f4565b610379565b600a546101659060ff1681565b60405190151581526020015b60405180910390f35b6101656101883660046111f4565b60076020526000908152604090205460ff1681565b61014361043f565b6001546101b8906001600160a01b031681565b6040516001600160a01b039091168152602001610171565b6101436101de366004611220565b610510565b6003546101b8906001600160a01b031681565b6101656102043660046111f4565b60086020526000908152604090205460ff1681565b6101436105ce565b61014361022f366004611269565b6106b8565b6000546101b8906001600160a01b031681565b61025a6102553660046111f4565b610755565b604051908152602001610171565b6101436102763660046111f4565b61087d565b6006546101b8906001600160a01b031681565b6004546101b8906001600160a01b031681565b6005546101b8906001600160a01b031681565b61025a6102c23660046111f4565b60096020526000908152604090205481565b6102e76102e2366004611269565b6108de565b60408051928352602083019190915201610171565b61014361030a3660046111f4565b610e89565b6000546001600160a01b031633148061033257506005546001600160a01b031633145b6103575760405162461bcd60e51b815260040161034e90611293565b60405180910390fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146103eb5760405162461bcd60e51b815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201526e37b936903a3434b99030b1ba34b7b760891b606482015260840161034e565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229060200160405180910390a150565b6000546001600160a01b031633148061046257506006546001600160a01b031633145b8061047757506005546001600160a01b031633145b6104c35760405162461bcd60e51b815260206004820152601f60248201527f4e6f74206f776e65722c2063757261746f722c206f722074696d656c6f636b00604482015260640161034e565b600a805460ff8082161560ff1990921682179092556040519116151581527fa47e236370e478b9d163098c7c1f4f67b6efbb6683eeb0a669f04f302653779d9060200160405180910390a1565b6000546001600160a01b031633148061053357506005546001600160a01b031633145b61054f5760405162461bcd60e51b815260040161034e90611293565b6001600160a01b0383166000818152600860209081526040808320805487151560ff199182168117909255600784529382902080548715159516851790558151948552918401919091528201527f404f22d93b56a7e73713d7bbe543b016084d4d75b4d9177e8b8ab251f6e877d09060600160405180910390a1505050565b6001546001600160a01b031633146106465760405162461bcd60e51b815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527402063616e20616363657074206f776e65727368697605c1b606482015260840161034e565b600054600154604080516001600160a01b0393841681529290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b03163314806106db57506005546001600160a01b031633145b6106f75760405162461bcd60e51b815260040161034e90611293565b60005461070f9083906001600160a01b031683610eea565b604080516001600160a01b0384168152602081018390527f55350610fe57096d8c0ffa30beede987326bccfcb0b4415804164d0dd50ce8b1910160405180910390a15050565b600480546040516334c1e32560e21b81526001600160a01b03848116938201939093524260248201526000928392169063d3078c9490604401602060405180830381865afa1580156107ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107cf91906112c2565b90506000610866670de0b6b3a764000061086084600460009054906101000a90046001600160a01b03166001600160a01b0316630a3be7576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610836573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085a91906112c2565b90611005565b9061108d565b90506108758162093a80611005565b949350505050565b6000546001600160a01b03163314806108a057506005546001600160a01b031633145b6108bc5760405162461bcd60e51b815260040161034e90611293565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b600a54600090819060ff1615156001146109325760405162461bcd60e51b81526020600482015260156024820152742234b9ba3934b13aba34b7b7399030b9329037b33360591b604482015260640161034e565b6002805414156109845760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161034e565b600280556000546001600160a01b03163314806109ab57506006546001600160a01b031633145b806109c057506005546001600160a01b031633145b610a0c5760405162461bcd60e51b815260206004820152601f60248201527f4e6f74206f776e65722c2063757261746f722c206f722074696d656c6f636b00604482015260640161034e565b6001600160a01b03841660009081526007602052604090205460ff16610a6c5760405162461bcd60e51b815260206004820152601560248201527411d85d59d9481b9bdd081dda1a5d195b1a5cdd1959605a1b604482015260640161034e565b6001600160a01b03841660009081526009602052604090205480610a935760019250610ada565b6001600160a01b03851660009081526009602052604090205462093a8090610abc9042906110cf565b610ac691906112f1565b925082610ada576000809250925050610e7b565b6000915060005b83811015610c9d57600081610b6f5760048054604051636472eee160e01b81526001600160a01b038a811693820193909352426024820152911690636472eee1906044016020604051808303816000875af1158015610b44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6891906112c2565b9050610c08565b6004546001600160a01b031663d3078c9488610b98610b918662093a80611313565b42906110cf565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015610be1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0591906112c2565b90505b6000610c6d670de0b6b3a764000061086084600460009054906101000a90046001600160a01b03166001600160a01b0316630a3be7576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610836573d6000803e3d6000fd5b9050610c86610c7f8262093a80611005565b8690611111565b945050508080610c9590611332565b915050610ae1565b506001600160a01b0385166000908152600960209081526040808320429055600890915290205460ff1615610da35760035460405163095ea7b360e01b81526001600160a01b038781166004830152602482018590529091169063095ea7b3906044016020604051808303816000875af1158015610d1f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d43919061134d565b50604051634ae3decf60e01b8152600481018390526001600160a01b03861690634ae3decf90602401600060405180830381600087803b158015610d8657600080fd5b505af1158015610d9a573d6000803e3d6000fd5b50505050610e36565b600354610dba906001600160a01b03168684610eea565b6000610dc98362093a8061108d565b60405163de9853ad60e01b81526004810182905260248101879052600160448201529091506001600160a01b0387169063de9853ad90606401600060405180830381600087803b158015610e1c57600080fd5b505af1158015610e30573d6000803e3d6000fd5b50505050505b846001600160a01b03167fe34918ff1c7084970068b53fd71ad6d8b04e9f15d3886cbf006443e6cdc52ea683604051610e7191815260200190565b60405180910390a2505b600160025590939092509050565b6000546001600160a01b0316331480610eac57506005546001600160a01b031633145b610ec85760405162461bcd60e51b815260040161034e90611293565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1790529151600092839290871691610f46919061139a565b6000604051808303816000865af19150503d8060008114610f83576040519150601f19603f3d011682016040523d82523d6000602084013e610f88565b606091505b5091509150818015610fb2575080511580610fb2575080806020019051810190610fb2919061134d565b610ffe5760405162461bcd60e51b815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c454400604482015260640161034e565b5050505050565b60008261101457506000611087565b60006110208385611313565b90508261102d85836112f1565b146110845760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161034e565b90505b92915050565b600061108483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611170565b600061108483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111a7565b60008061111e83856113b6565b9050838110156110845760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161034e565b600081836111915760405162461bcd60e51b815260040161034e91906113ce565b50600061119e84866112f1565b95945050505050565b600081848411156111cb5760405162461bcd60e51b815260040161034e91906113ce565b50600061119e8486611401565b80356001600160a01b03811681146111ef57600080fd5b919050565b60006020828403121561120657600080fd5b611084826111d8565b801515811461121d57600080fd5b50565b60008060006060848603121561123557600080fd5b61123e846111d8565b9250602084013561124e8161120f565b9150604084013561125e8161120f565b809150509250925092565b6000806040838503121561127c57600080fd5b611285836111d8565b946020939093013593505050565b6020808252601590820152744e6f74206f776e6572206f722074696d656c6f636b60581b604082015260600190565b6000602082840312156112d457600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008261130e57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561132d5761132d6112db565b500290565b6000600019821415611346576113466112db565b5060010190565b60006020828403121561135f57600080fd5b81516110848161120f565b60005b8381101561138557818101518382015260200161136d565b83811115611394576000848401525b50505050565b600082516113ac81846020870161136a565b9190910192915050565b600082198211156113c9576113c96112db565b500190565b60208152600082518060208401526113ed81604085016020870161136a565b601f01601f19169190910160400192915050565b600082821015611413576114136112db565b50039056fea264697066735822122074ba119604a739cf8e3eff42bbdcfb8b68121b7a612fabd16ef4d1cd2b21ef3164736f6c634300080b00330000000000000000000000008c250a8128c76b25103174d0cf9dee4800ebfecd0000000000000000000000009dca574b1b6bd51cbd02a3d98716597bd84c45eb0000000000000000000000008c250a8128c76b25103174d0cf9dee4800ebfecd000000000000000000000000ad01dffe604cdc172d8237566ee3a3ab6524d4c60000000000000000000000002ca245b757a4ded7e489aabb55766bd561ee6f1d

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061012b5760003560e01c80638980f11f116100ad578063d8b9a01811610071578063d8b9a0181461028e578063dc6663c7146102a1578063e81e17c6146102b4578063e8e5d51d146102d4578063e90956cf146102fc57600080fd5b80638980f11f146102215780638da5cb5b146102345780639d18e4b014610247578063bdacb30314610268578063c92073c11461027b57600080fd5b806353a47bb7116100f457806353a47bb7146101a5578063570b1e99146101d0578063678a2226146101e35780636ca81c1c146101f657806379ba50971461021957600080fd5b806291d2b8146101305780631627540c146101455780631f8a7edf146101585780632fd37b081461017a578063305d6d5f1461019d575b600080fd5b61014361013e3660046111f4565b61030f565b005b6101436101533660046111f4565b610379565b600a546101659060ff1681565b60405190151581526020015b60405180910390f35b6101656101883660046111f4565b60076020526000908152604090205460ff1681565b61014361043f565b6001546101b8906001600160a01b031681565b6040516001600160a01b039091168152602001610171565b6101436101de366004611220565b610510565b6003546101b8906001600160a01b031681565b6101656102043660046111f4565b60086020526000908152604090205460ff1681565b6101436105ce565b61014361022f366004611269565b6106b8565b6000546101b8906001600160a01b031681565b61025a6102553660046111f4565b610755565b604051908152602001610171565b6101436102763660046111f4565b61087d565b6006546101b8906001600160a01b031681565b6004546101b8906001600160a01b031681565b6005546101b8906001600160a01b031681565b61025a6102c23660046111f4565b60096020526000908152604090205481565b6102e76102e2366004611269565b6108de565b60408051928352602083019190915201610171565b61014361030a3660046111f4565b610e89565b6000546001600160a01b031633148061033257506005546001600160a01b031633145b6103575760405162461bcd60e51b815260040161034e90611293565b60405180910390fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146103eb5760405162461bcd60e51b815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201526e37b936903a3434b99030b1ba34b7b760891b606482015260840161034e565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229060200160405180910390a150565b6000546001600160a01b031633148061046257506006546001600160a01b031633145b8061047757506005546001600160a01b031633145b6104c35760405162461bcd60e51b815260206004820152601f60248201527f4e6f74206f776e65722c2063757261746f722c206f722074696d656c6f636b00604482015260640161034e565b600a805460ff8082161560ff1990921682179092556040519116151581527fa47e236370e478b9d163098c7c1f4f67b6efbb6683eeb0a669f04f302653779d9060200160405180910390a1565b6000546001600160a01b031633148061053357506005546001600160a01b031633145b61054f5760405162461bcd60e51b815260040161034e90611293565b6001600160a01b0383166000818152600860209081526040808320805487151560ff199182168117909255600784529382902080548715159516851790558151948552918401919091528201527f404f22d93b56a7e73713d7bbe543b016084d4d75b4d9177e8b8ab251f6e877d09060600160405180910390a1505050565b6001546001600160a01b031633146106465760405162461bcd60e51b815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527402063616e20616363657074206f776e65727368697605c1b606482015260840161034e565b600054600154604080516001600160a01b0393841681529290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b03163314806106db57506005546001600160a01b031633145b6106f75760405162461bcd60e51b815260040161034e90611293565b60005461070f9083906001600160a01b031683610eea565b604080516001600160a01b0384168152602081018390527f55350610fe57096d8c0ffa30beede987326bccfcb0b4415804164d0dd50ce8b1910160405180910390a15050565b600480546040516334c1e32560e21b81526001600160a01b03848116938201939093524260248201526000928392169063d3078c9490604401602060405180830381865afa1580156107ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107cf91906112c2565b90506000610866670de0b6b3a764000061086084600460009054906101000a90046001600160a01b03166001600160a01b0316630a3be7576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610836573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085a91906112c2565b90611005565b9061108d565b90506108758162093a80611005565b949350505050565b6000546001600160a01b03163314806108a057506005546001600160a01b031633145b6108bc5760405162461bcd60e51b815260040161034e90611293565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b600a54600090819060ff1615156001146109325760405162461bcd60e51b81526020600482015260156024820152742234b9ba3934b13aba34b7b7399030b9329037b33360591b604482015260640161034e565b6002805414156109845760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161034e565b600280556000546001600160a01b03163314806109ab57506006546001600160a01b031633145b806109c057506005546001600160a01b031633145b610a0c5760405162461bcd60e51b815260206004820152601f60248201527f4e6f74206f776e65722c2063757261746f722c206f722074696d656c6f636b00604482015260640161034e565b6001600160a01b03841660009081526007602052604090205460ff16610a6c5760405162461bcd60e51b815260206004820152601560248201527411d85d59d9481b9bdd081dda1a5d195b1a5cdd1959605a1b604482015260640161034e565b6001600160a01b03841660009081526009602052604090205480610a935760019250610ada565b6001600160a01b03851660009081526009602052604090205462093a8090610abc9042906110cf565b610ac691906112f1565b925082610ada576000809250925050610e7b565b6000915060005b83811015610c9d57600081610b6f5760048054604051636472eee160e01b81526001600160a01b038a811693820193909352426024820152911690636472eee1906044016020604051808303816000875af1158015610b44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6891906112c2565b9050610c08565b6004546001600160a01b031663d3078c9488610b98610b918662093a80611313565b42906110cf565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015610be1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0591906112c2565b90505b6000610c6d670de0b6b3a764000061086084600460009054906101000a90046001600160a01b03166001600160a01b0316630a3be7576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610836573d6000803e3d6000fd5b9050610c86610c7f8262093a80611005565b8690611111565b945050508080610c9590611332565b915050610ae1565b506001600160a01b0385166000908152600960209081526040808320429055600890915290205460ff1615610da35760035460405163095ea7b360e01b81526001600160a01b038781166004830152602482018590529091169063095ea7b3906044016020604051808303816000875af1158015610d1f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d43919061134d565b50604051634ae3decf60e01b8152600481018390526001600160a01b03861690634ae3decf90602401600060405180830381600087803b158015610d8657600080fd5b505af1158015610d9a573d6000803e3d6000fd5b50505050610e36565b600354610dba906001600160a01b03168684610eea565b6000610dc98362093a8061108d565b60405163de9853ad60e01b81526004810182905260248101879052600160448201529091506001600160a01b0387169063de9853ad90606401600060405180830381600087803b158015610e1c57600080fd5b505af1158015610e30573d6000803e3d6000fd5b50505050505b846001600160a01b03167fe34918ff1c7084970068b53fd71ad6d8b04e9f15d3886cbf006443e6cdc52ea683604051610e7191815260200190565b60405180910390a2505b600160025590939092509050565b6000546001600160a01b0316331480610eac57506005546001600160a01b031633145b610ec85760405162461bcd60e51b815260040161034e90611293565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1790529151600092839290871691610f46919061139a565b6000604051808303816000865af19150503d8060008114610f83576040519150601f19603f3d011682016040523d82523d6000602084013e610f88565b606091505b5091509150818015610fb2575080511580610fb2575080806020019051810190610fb2919061134d565b610ffe5760405162461bcd60e51b815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c454400604482015260640161034e565b5050505050565b60008261101457506000611087565b60006110208385611313565b90508261102d85836112f1565b146110845760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161034e565b90505b92915050565b600061108483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611170565b600061108483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111a7565b60008061111e83856113b6565b9050838110156110845760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161034e565b600081836111915760405162461bcd60e51b815260040161034e91906113ce565b50600061119e84866112f1565b95945050505050565b600081848411156111cb5760405162461bcd60e51b815260040161034e91906113ce565b50600061119e8486611401565b80356001600160a01b03811681146111ef57600080fd5b919050565b60006020828403121561120657600080fd5b611084826111d8565b801515811461121d57600080fd5b50565b60008060006060848603121561123557600080fd5b61123e846111d8565b9250602084013561124e8161120f565b9150604084013561125e8161120f565b809150509250925092565b6000806040838503121561127c57600080fd5b611285836111d8565b946020939093013593505050565b6020808252601590820152744e6f74206f776e6572206f722074696d656c6f636b60581b604082015260600190565b6000602082840312156112d457600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008261130e57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561132d5761132d6112db565b500290565b6000600019821415611346576113466112db565b5060010190565b60006020828403121561135f57600080fd5b81516110848161120f565b60005b8381101561138557818101518382015260200161136d565b83811115611394576000848401525b50505050565b600082516113ac81846020870161136a565b9190910192915050565b600082198211156113c9576113c96112db565b500190565b60208152600082518060208401526113ed81604085016020870161136a565b601f01601f19169190910160400192915050565b600082821015611413576114136112db565b50039056fea264697066735822122074ba119604a739cf8e3eff42bbdcfb8b68121b7a612fabd16ef4d1cd2b21ef3164736f6c634300080b0033

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

0000000000000000000000008c250a8128c76b25103174d0cf9dee4800ebfecd0000000000000000000000009dca574b1b6bd51cbd02a3d98716597bd84c45eb0000000000000000000000008c250a8128c76b25103174d0cf9dee4800ebfecd000000000000000000000000ad01dffe604cdc172d8237566ee3a3ab6524d4c60000000000000000000000002ca245b757a4ded7e489aabb55766bd561ee6f1d

-----Decoded View---------------
Arg [0] : _owner (address): 0x8C250a8128c76B25103174d0Cf9dee4800EBfECd
Arg [1] : _timelock_address (address): 0x9dcA574B1B6BD51CbD02A3d98716597Bd84C45Eb
Arg [2] : _curator_address (address): 0x8C250a8128c76B25103174d0Cf9dee4800EBfECd
Arg [3] : _reward_token_address (address): 0xad01DFfe604CDc172D8237566eE3a3ab6524d4C6
Arg [4] : _gauge_controller_address (address): 0x2cA245b757a4Ded7e489AaBb55766Bd561EE6F1D

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000008c250a8128c76b25103174d0cf9dee4800ebfecd
Arg [1] : 0000000000000000000000009dca574b1b6bd51cbd02a3d98716597bd84c45eb
Arg [2] : 0000000000000000000000008c250a8128c76b25103174d0cf9dee4800ebfecd
Arg [3] : 000000000000000000000000ad01dffe604cdc172d8237566ee3a3ab6524d4c6
Arg [4] : 0000000000000000000000002ca245b757a4ded7e489aabb55766bd561ee6f1d


Deployed Bytecode Sourcemap

59761:7088:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;66346:168;;;;;;:::i;:::-;;:::i;:::-;;3851:141;;;;;;:::i;:::-;;:::i;60595:27::-;;;;;;;;;;;;548:14:1;;541:22;523:41;;511:2;496:18;60595:27:0;;;;;;;;60338:47;;;;;;:::i;:::-;;;;;;;;;;;;;;;;65071:181;;;:::i;3619:29::-;;;;;-1:-1:-1;;;;;3619:29:0;;;;;;-1:-1:-1;;;;;739:32:1;;;721:51;;709:2;694:18;3619:29:0;575:203:1;65774:302:0;;;;;;:::i;:::-;;:::i;59983:35::-;;;;;-1:-1:-1;;;;;59983:35:0;;;60392:44;;;;;;:::i;:::-;;;;;;;;;;;;;;;;4000:271;;;:::i;65466:300::-;;;;;;:::i;:::-;;:::i;3592:20::-;;;;;-1:-1:-1;;;;;3592:20:0;;;61777:346;;;;;;:::i;:::-;;:::i;:::-;;;1766:25:1;;;1754:2;1739:18;61777:346:0;1620:177:1;66084:117:0;;;;;;:::i;:::-;;:::i;60138:30::-;;;;;-1:-1:-1;;;;;60138:30:0;;;60025:42;;;;;-1:-1:-1;;;;;60025:42:0;;;60100:31;;;;;-1:-1:-1;;;;;60100:31:0;;;60514:55;;;;;;:::i;:::-;;;;;;;;;;;;;;62211:2731;;;;;;:::i;:::-;;:::i;:::-;;;;2210:25:1;;;2266:2;2251:18;;2244:34;;;;2183:18;62211:2731:0;2036:248:1;66209:129:0;;;;;;:::i;:::-;;:::i;66346:168::-;60733:5;;-1:-1:-1;;;;;60733:5:0;60719:10;:19;;:53;;-1:-1:-1;60756:16:0;;-1:-1:-1;;;;;60756:16:0;60742:10;:30;60719:53;60711:87;;;;-1:-1:-1;;;60711:87:0;;;;;;;:::i;:::-;;;;;;;;;66442:16:::1;:64:::0;;-1:-1:-1;;;;;;66442:64:0::1;-1:-1:-1::0;;;;;66442:64:0;;;::::1;::::0;;;::::1;::::0;;66346:168::o;3851:141::-;4331:5;;-1:-1:-1;;;;;4331:5:0;4317:10;:19;4309:79;;;;-1:-1:-1;;;4309:79:0;;2841:2:1;4309:79:0;;;2823:21:1;2880:2;2860:18;;;2853:30;2919:34;2899:18;;;2892:62;-1:-1:-1;;;2970:18:1;;;2963:45;3025:19;;4309:79:0;2639:411:1;4309:79:0;3923:14:::1;:23:::0;;-1:-1:-1;;;;;;3923:23:0::1;-1:-1:-1::0;;;;;3923:23:0;::::1;::::0;;::::1;::::0;;;3962:22:::1;::::0;721:51:1;;;3962:22:0::1;::::0;709:2:1;694:18;3962:22:0::1;;;;;;;3851:141:::0;:::o;65071:181::-;60903:5;;-1:-1:-1;;;;;60903:5:0;60889:10;:19;;:52;;-1:-1:-1;60926:15:0;;-1:-1:-1;;;;;60926:15:0;60912:10;:29;60889:52;:86;;;-1:-1:-1;60959:16:0;;-1:-1:-1;;;;;60959:16:0;60945:10;:30;60889:86;60881:130;;;;-1:-1:-1;;;60881:130:0;;3257:2:1;60881:130:0;;;3239:21:1;3296:2;3276:18;;;3269:30;3335:33;3315:18;;;3308:61;3386:18;;60881:130:0;3055:355:1;60881:130:0;65174:15:::1;::::0;;::::1;::::0;;::::1;65173:16;-1:-1:-1::0;;65155:34:0;;::::1;::::0;::::1;::::0;;;65207:37:::1;::::0;65228:15;;548:14:1;541:22;523:41;;65207:37:0::1;::::0;511:2:1;496:18;65207:37:0::1;;;;;;;65071:181::o:0;65774:302::-;60733:5;;-1:-1:-1;;;;;60733:5:0;60719:10;:19;;:53;;-1:-1:-1;60756:16:0;;-1:-1:-1;;;;;60756:16:0;60742:10;:30;60719:53;60711:87;;;;-1:-1:-1;;;60711:87:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;65891:28:0;::::1;;::::0;;;:12:::1;:28;::::0;;;;;;;:44;;;::::1;;-1:-1:-1::0;;65891:44:0;;::::1;::::0;::::1;::::0;;;65946:15:::1;:31:::0;;;;;;:44;;;::::1;;::::0;::::1;::::0;::::1;::::0;;66008:60;;3605:51:1;;;3672:18;;;3665:50;;;;3731:18;;3724:50;66008:60:0::1;::::0;3593:2:1;3578:18;66008:60:0::1;;;;;;;65774:302:::0;;;:::o;4000:271::-;4069:14;;-1:-1:-1;;;;;4069:14:0;4055:10;:28;4047:94;;;;-1:-1:-1;;;4047:94:0;;3987:2:1;4047:94:0;;;3969:21:1;4026:2;4006:18;;;3999:30;4065:34;4045:18;;;4038:62;-1:-1:-1;;;4116:18:1;;;4109:51;4177:19;;4047:94:0;3785:417:1;4047:94:0;4170:5;;;4177:14;4157:35;;;-1:-1:-1;;;;;4170:5:0;;;4419:34:1;;4177:14:0;;;;4484:2:1;4469:18;;4462:43;4157:35:0;;4354:18:1;4157:35:0;;;;;;;4211:14;;;;4203:22;;-1:-1:-1;;;;;;4203:22:0;;;-1:-1:-1;;;;;4211:14:0;;4203:22;;;;4236:27;;;4000:271::o;65466:300::-;60733:5;;-1:-1:-1;;;;;60733:5:0;60719:10;:19;;:53;;-1:-1:-1;60756:16:0;;-1:-1:-1;;;;;60756:16:0;60742:10;:30;60719:53;60711:87;;;;-1:-1:-1;;;60711:87:0;;;;;;;:::i;:::-;65682:5:::1;::::0;65640:61:::1;::::0;65668:12;;-1:-1:-1;;;;;65682:5:0::1;65689:11:::0;65640:27:::1;:61::i;:::-;65717:41;::::0;;-1:-1:-1;;;;;4708:32:1;;4690:51;;4772:2;4757:18;;4750:34;;;65717:41:0::1;::::0;4663:18:1;65717:41:0::1;;;;;;;65466:300:::0;;:::o;61777:346::-;61899:16;;;:70;;-1:-1:-1;;;61899:70:0;;-1:-1:-1;;;;;4708:32:1;;;61899:70:0;;;4690:51:1;;;;61953:15:0;4757:18:1;;;4750:34;61844:21:0;;;;61899:16;;:38;;4663:18:1;;61899:70:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;61878:91;;61980:16;61999:67;62061:4;61999:57;62045:10;62000:16;;;;;;;;;-1:-1:-1;;;;;62000:16:0;-1:-1:-1;;;;;62000:37:0;;:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;61999:45;;:57::i;:::-;:61;;:67::i;:::-;61980:86;-1:-1:-1;62093:22:0;61980:86;60290:6;62093:12;:22::i;:::-;62077:38;61777:346;-1:-1:-1;;;;61777:346:0:o;66084:117::-;60733:5;;-1:-1:-1;;;;;60733:5:0;60719:10;:19;;:53;;-1:-1:-1;60756:16:0;;-1:-1:-1;;;;;60756:16:0;60742:10;:30;60719:53;60711:87;;;;-1:-1:-1;;;60711:87:0;;;;;;;:::i;:::-;66161:16:::1;:32:::0;;-1:-1:-1;;;;;;66161:32:0::1;-1:-1:-1::0;;;;;66161:32:0;;;::::1;::::0;;;::::1;::::0;;66084:117::o;62211:2731::-;61084:15;;62369:21;;;;61084:15;;:23;;:15;:23;61076:57;;;;-1:-1:-1;;;61076:57:0;;5186:2:1;61076:57:0;;;5168:21:1;5225:2;5205:18;;;5198:30;-1:-1:-1;;;5244:18:1;;;5237:51;5305:18;;61076:57:0;4984:345:1;61076:57:0;2500:1:::1;3106:7:::0;::::1;:19;;3098:63;;;::::0;-1:-1:-1;;;3098:63:0;;5536:2:1;3098:63:0::1;::::0;::::1;5518:21:1::0;5575:2;5555:18;;;5548:30;5614:33;5594:18;;;5587:61;5665:18;;3098:63:0::1;5334:355:1::0;3098:63:0::1;2500:1;3239:18:::0;;60903:5:::2;::::0;-1:-1:-1;;;;;60903:5:0::2;60889:10;:19;::::0;:52:::2;;-1:-1:-1::0;60926:15:0::2;::::0;-1:-1:-1;;;;;60926:15:0::2;60912:10;:29;60889:52;:86;;;-1:-1:-1::0;60959:16:0::2;::::0;-1:-1:-1;;;;;60959:16:0::2;60945:10;:30;60889:86;60881:130;;;::::0;-1:-1:-1;;;60881:130:0;;3257:2:1;60881:130:0::2;::::0;::::2;3239:21:1::0;3296:2;3276:18;;;3269:30;3335:33;3315:18;;;3308:61;3386:18;;60881:130:0::2;3055:355:1::0;60881:130:0::2;-1:-1:-1::0;;;;;62433:30:0;::::3;;::::0;;;:15:::3;:30;::::0;;;;;::::3;;62425:64;;;::::0;-1:-1:-1;;;62425:64:0;;5896:2:1;62425:64:0::3;::::0;::::3;5878:21:1::0;5935:2;5915:18;;;5908:30;-1:-1:-1;;;5954:18:1;;;5947:51;6015:18;;62425:64:0::3;5694:345:1::0;62425:64:0::3;-1:-1:-1::0;;;;;62576:35:0;::::3;62551:22;62576:35:::0;;;:20:::3;:35;::::0;;;;;62682:19;62678:433:::3;;62733:1;62717:17;;62678:433;;;-1:-1:-1::0;;;;;62849:35:0;::::3;;::::0;;;:20:::3;:35;::::0;;;;;60290:6:::3;::::0;62827:58:::3;::::0;62828:15:::3;::::0;62827:21:::3;:58::i;:::-;:69;;;;:::i;:::-;62811:85:::0;-1:-1:-1;63032:18:0;63028:72:::3;;63079:1;63082::::0;63071:13:::3;;;;;;;63028:72;63212:1;63197:16;;63229:6;63224:754;63246:13;63241:1;:19;63224:754;;;63281:26;63326:6:::0;63322:450:::3;;63490:16;::::0;;:76:::3;::::0;-1:-1:-1;;;63490:76:0;;-1:-1:-1;;;;;4708:32:1;;;63490:76:0;;::::3;4690:51:1::0;;;;63550:15:0::3;4757:18:1::0;;;4750:34;63490:16:0;::::3;::::0;:44:::3;::::0;4663:18:1;;63490:76:0::3;;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;63469:97;;63322:450;;;63666:16;::::0;-1:-1:-1;;;;;63666:16:0::3;:38;63705:13:::0;63720:35:::3;63742:12;63753:1:::0;60290:6:::3;63742:12;:::i;:::-;63721:15;::::0;63720:21:::3;:35::i;:::-;63666:90;::::0;-1:-1:-1;;;;;;63666:90:0::3;::::0;;;;;;-1:-1:-1;;;;;4708:32:1;;;63666:90:0::3;::::0;::::3;4690:51:1::0;4757:18;;;4750:34;4663:18;;63666:90:0::3;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;63645:111;;63322:450;63786:24;63813:75;63883:4;63813:65;63859:18;63814:16;;;;;;;;;-1:-1:-1::0;;;;;63814:16:0::3;-1:-1:-1::0;;;;;63814:37:0::3;;:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::3;;;;63813:75;63786:102:::0;-1:-1:-1;63918:48:0::3;63935:30;63786:102:::0;60290:6:::3;63935:20;:30::i;:::-;63918:12:::0;;:16:::3;:48::i;:::-;63903:63;;63266:712;;63262:3;;;;;:::i;:::-;;;;63224:754;;;-1:-1:-1::0;;;;;;64028:35:0;::::3;;::::0;;;:20:::3;:35;::::0;;;;;;;64066:15:::3;64028:53:::0;;64098:12:::3;:27:::0;;;;;;::::3;;64094:777;;;64270:20;::::0;64264:64:::3;::::0;-1:-1:-1;;;64264:64:0;;-1:-1:-1;;;;;4708:32:1;;;64264:64:0::3;::::0;::::3;4690:51:1::0;4757:18;;;4750:34;;;64270:20:0;;::::3;::::0;64264:35:::3;::::0;4663:18:1;;64264:64:0::3;;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;64383:59:0::3;::::0;-1:-1:-1;;;64383:59:0;;::::3;::::0;::::3;1766:25:1::0;;;-1:-1:-1;;;;;64383:45:0;::::3;::::0;::::3;::::0;1739:18:1;;64383:59:0::3;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;::::0;::::3;;;;;;;;;64094:777;;;64579:20;::::0;64551:78:::3;::::0;-1:-1:-1;;;;;64579:20:0::3;64601:13:::0;64616:12;64551:27:::3;:78::i;:::-;64710:21;64734:26;:12:::0;60290:6:::3;64734:16;:26::i;:::-;64775:84;::::0;-1:-1:-1;;;64775:84:0;;::::3;::::0;::::3;7157:25:1::0;;;7198:18;;;7191:34;;;64853:4:0::3;7241:18:1::0;;;7234:50;64710::0;;-1:-1:-1;;;;;;64775:51:0;::::3;::::0;::::3;::::0;7130:18:1;;64775:84:0::3;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;::::0;::::3;;;;;;;;;64469:402;64094:777;64906:13;-1:-1:-1::0;;;;;64888:46:0::3;;64921:12;64888:46;;;;1766:25:1::0;;1754:2;1739:18;;1620:177;64888:46:0::3;;;;;;;;62414:2528;61022:1;2456::::1;3418:7;:22:::0;62211:2731;;;;-1:-1:-1;62211:2731:0;-1:-1:-1;62211:2731:0:o;66209:129::-;60733:5;;-1:-1:-1;;;;;60733:5:0;60719:10;:19;;:53;;-1:-1:-1;60756:16:0;;-1:-1:-1;;;;;60756:16:0;60742:10;:30;60719:53;60711:87;;;;-1:-1:-1;;;60711:87:0;;;;;;;:::i;:::-;66292:15:::1;:38:::0;;-1:-1:-1;;;;;;66292:38:0::1;-1:-1:-1::0;;;;;66292:38:0;;;::::1;::::0;;;::::1;::::0;;66209:129::o;5109:361::-;5304:45;;;-1:-1:-1;;;;;4708:32:1;;;5304:45:0;;;4690:51:1;4757:18;;;;4750:34;;;5304:45:0;;;;;;;;;;4663:18:1;;;;5304:45:0;;;;;;;-1:-1:-1;;;;;5304:45:0;-1:-1:-1;;;5304:45:0;;;5293:57;;-1:-1:-1;;;;5293:10:0;;;;:57;;5304:45;5293:57;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5257:93;;;;5369:7;:57;;;;-1:-1:-1;5381:11:0;;:16;;:44;;;5412:4;5401:24;;;;;;;;;;;;:::i;:::-;5361:101;;;;-1:-1:-1;;;5361:101:0;;8039:2:1;5361:101:0;;;8021:21:1;8078:2;8058:18;;;8051:30;8117:33;8097:18;;;8090:61;8168:18;;5361:101:0;7837:355:1;5361:101:0;5179:291;;5109:361;;;:::o;26612:471::-;26670:7;26915:6;26911:47;;-1:-1:-1;26945:1:0;26938:8;;26911:47;26970:9;26982:5;26986:1;26982;:5;:::i;:::-;26970:17;-1:-1:-1;27015:1:0;27006:5;27010:1;26970:17;27006:5;:::i;:::-;:10;26998:56;;;;-1:-1:-1;;;26998:56:0;;8399:2:1;26998:56:0;;;8381:21:1;8438:2;8418:18;;;8411:30;8477:34;8457:18;;;8450:62;-1:-1:-1;;;8528:18:1;;;8521:31;8569:19;;26998:56:0;8197:397:1;26998:56:0;27074:1;-1:-1:-1;26612:471:0;;;;;:::o;27551:132::-;27609:7;27636:39;27640:1;27643;27636:39;;;;;;;;;;;;;;;;;:3;:39::i;25696:136::-;25754:7;25781:43;25785:1;25788;25781:43;;;;;;;;;;;;;;;;;:3;:43::i;25240:181::-;25298:7;;25330:5;25334:1;25330;:5;:::i;:::-;25318:17;;25359:1;25354;:6;;25346:46;;;;-1:-1:-1;;;25346:46:0;;8934:2:1;25346:46:0;;;8916:21:1;8973:2;8953:18;;;8946:30;9012:29;8992:18;;;8985:57;9059:18;;25346:46:0;8732:351:1;28213:345:0;28299:7;28401:12;28394:5;28386:28;;;;-1:-1:-1;;;28386:28:0;;;;;;;;:::i;:::-;-1:-1:-1;28425:9:0;28437:5;28441:1;28437;:5;:::i;:::-;28425:17;28213:345;-1:-1:-1;;;;;28213:345:0:o;26169:192::-;26255:7;26291:12;26283:6;;;;26275:29;;;;-1:-1:-1;;;26275:29:0;;;;;;;;:::i;:::-;-1:-1:-1;26315:9:0;26327:5;26331:1;26327;:5;:::i;14:173:1:-;82:20;;-1:-1:-1;;;;;131:31:1;;121:42;;111:70;;177:1;174;167:12;111:70;14:173;;;:::o;192:186::-;251:6;304:2;292:9;283:7;279:23;275:32;272:52;;;320:1;317;310:12;272:52;343:29;362:9;343:29;:::i;783:118::-;869:5;862:13;855:21;848:5;845:32;835:60;;891:1;888;881:12;835:60;783:118;:::o;906:450::-;977:6;985;993;1046:2;1034:9;1025:7;1021:23;1017:32;1014:52;;;1062:1;1059;1052:12;1014:52;1085:29;1104:9;1085:29;:::i;:::-;1075:39;;1164:2;1153:9;1149:18;1136:32;1177:28;1199:5;1177:28;:::i;:::-;1224:5;-1:-1:-1;1281:2:1;1266:18;;1253:32;1294:30;1253:32;1294:30;:::i;:::-;1343:7;1333:17;;;906:450;;;;;:::o;1361:254::-;1429:6;1437;1490:2;1478:9;1469:7;1465:23;1461:32;1458:52;;;1506:1;1503;1496:12;1458:52;1529:29;1548:9;1529:29;:::i;:::-;1519:39;1605:2;1590:18;;;;1577:32;;-1:-1:-1;;;1361:254:1:o;2289:345::-;2491:2;2473:21;;;2530:2;2510:18;;;2503:30;-1:-1:-1;;;2564:2:1;2549:18;;2542:51;2625:2;2610:18;;2289:345::o;4795:184::-;4865:6;4918:2;4906:9;4897:7;4893:23;4889:32;4886:52;;;4934:1;4931;4924:12;4886:52;-1:-1:-1;4957:16:1;;4795:184;-1:-1:-1;4795:184:1:o;6044:127::-;6105:10;6100:3;6096:20;6093:1;6086:31;6136:4;6133:1;6126:15;6160:4;6157:1;6150:15;6176:217;6216:1;6242;6232:132;;6286:10;6281:3;6277:20;6274:1;6267:31;6321:4;6318:1;6311:15;6349:4;6346:1;6339:15;6232:132;-1:-1:-1;6378:9:1;;6176:217::o;6398:168::-;6438:7;6504:1;6500;6496:6;6492:14;6489:1;6486:21;6481:1;6474:9;6467:17;6463:45;6460:71;;;6511:18;;:::i;:::-;-1:-1:-1;6551:9:1;;6398:168::o;6571:135::-;6610:3;-1:-1:-1;;6631:17:1;;6628:43;;;6651:18;;:::i;:::-;-1:-1:-1;6698:1:1;6687:13;;6571:135::o;6711:245::-;6778:6;6831:2;6819:9;6810:7;6806:23;6802:32;6799:52;;;6847:1;6844;6837:12;6799:52;6879:9;6873:16;6898:28;6920:5;6898:28;:::i;7295:258::-;7367:1;7377:113;7391:6;7388:1;7385:13;7377:113;;;7467:11;;;7461:18;7448:11;;;7441:39;7413:2;7406:10;7377:113;;;7508:6;7505:1;7502:13;7499:48;;;7543:1;7534:6;7529:3;7525:16;7518:27;7499:48;;7295:258;;;:::o;7558:274::-;7687:3;7725:6;7719:13;7741:53;7787:6;7782:3;7775:4;7767:6;7763:17;7741:53;:::i;:::-;7810:16;;;;;7558:274;-1:-1:-1;;7558:274:1:o;8599:128::-;8639:3;8670:1;8666:6;8663:1;8660:13;8657:39;;;8676:18;;:::i;:::-;-1:-1:-1;8712:9:1;;8599:128::o;9088:383::-;9237:2;9226:9;9219:21;9200:4;9269:6;9263:13;9312:6;9307:2;9296:9;9292:18;9285:34;9328:66;9387:6;9382:2;9371:9;9367:18;9362:2;9354:6;9350:15;9328:66;:::i;:::-;9455:2;9434:15;-1:-1:-1;;9430:29:1;9415:45;;;;9462:2;9411:54;;9088:383;-1:-1:-1;;9088:383:1:o;9476:125::-;9516:4;9544:1;9541;9538:8;9535:34;;;9549:18;;:::i;:::-;-1:-1:-1;9586:9:1;;9476:125::o

Swarm Source

ipfs://74ba119604a739cf8e3eff42bbdcfb8b68121b7a612fabd16ef4d1cd2b21ef31

Block Transaction Gas Used Reward
view all blocks produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.